AnsweredAssumed Answered

JSON Filters for repeating complex structures

Question asked by rajeswari.krishnan on Jun 22, 2017
Latest reply on Jun 29, 2017 by Joel NeSmith

# monika mehta , # json filter 

 

The below is repeating json structure . When i tried with index shown as below i am getting values .

 

$.productOfferings[0].variants[0].sku

$.productOfferings[0].products[0].model

  

Since it’s a repeating structure  , for second variants element when I gave like

 

$.productOfferings[0].variants[1].sku , its thoriwng error . Can you please help on this ?

Can you please tell how do i reference the repeating json structure , the second variants elements value 


"productOfferings": [
{
"variants": [
{
"sku": "6536451"
}
],
"products": [
{
"manufacturer": "ARJ",
"serviceProvider": "T-Mobile",
"model": "TEST DEVICE"
}
],
"prices": [
{
"oneTimeCharges": [
{
"amount": 100,
"chargeType": "tradeIn"
}
]
}
]
},
{
"variants": [
{
"sku": "610214629210"
}
],
"products": [
{
"manufacturer": "Alcatel",
"serviceProvider": "T-Mobile",
"model": "665 One Touch"
}
],
"prices": [
{
"oneTimeCharges": [
{
"amount": 12,
"chargeType": "tradeIn"
}
]
}
]
},
{
"variants": [
{
"sku": "610214637147"
}
],
"products": [
{
"tacCodes": [
{
"tacCode": "01413500"
}
],
"manufacturer": "Alcatel",
"serviceProvider": "T-Mobile",
"model": "P310A OneTouch Pop 7 black"
}
],
"prices": [
{
"oneTimeCharges": [
{
"amount": 10,
"chargeType": "tradeIn"
}
]
}
]
},

Outcomes