Getting limited records from array by giving from and to values.

 Use Common Code -1

https://jsonata.blogspot.com/2021/04/common-code-1.html


{
"Phone": [
{
"type": "1",
"number": "0203 544 1234"
},
{
"type": "2",
"number": "01962 001234"
},
{
"type": "3",
"number": "01962 001235"
},
{
"type": "4",
"number": "077 7700 1234"
}
]}

Query:
Phone[[2..3]] op:[
{
"type": "3",
"number": "01962 001235"
},
{
"type": "4",
"number": "077 7700 1234"
}
]

No comments:

Post a Comment

calling outside object property or parent

 https://try.jsonata.org/dxPC5s-zM { "list1" : [ { "b" : 1 , "list2" : [ { ...