i have two kinds of input the jsons
case 1:
{
"MainObject": {
"MainObjectDetails": {
"SubDetails": {
"ObjectProperty": "1"
}
}
}
}
case 2:
{
"MainObject": {
"MainObjectDetails": {
"SubDetails": {
"ObjectProperty": [
"1",
"2"
]
}
}
}
}
i want the resultant json to be an integer type array for both cases. How can it be done within one spec? expected result:
Case 1:
{
"MainObject": {
"MainObjectDetails": {
"SubDetails": {
"ObjectProperty": [
1
]
}
}
}
}
Case 2:
{
"MainObject": {
"MainObjectDetails": {
"SubDetails": {
"ObjectProperty": [
1,
2
]
}
}
}
}