0

i have the next json structure:

    [
    {
        "entryDate": "2010-02-25",
        "nationality": "BR",
    },
    {
        "entryDate": "2010-02-25",
        "nationality": "SP",
    },
    {
        "entryDate": "2010-02-25",
        "nationality": "EU",
    }
    ]

I want, using jsonpath expression, to know the quantity of elements in my Json Array.

I trying with $.length but no work.

How can i know the total of elements using jsonpath expression?

Carlos Mario
  • 159
  • 1
  • 2
  • 11

1 Answers1

0

Try

  [
{
    "entryDate": "2010-02-25",
    "nationality": "BR"
},
{
    "entryDate": "2010-02-25",
    "nationality": "SP"
},
{
    "entryDate": "2010-02-25",
    "nationality": "EU"
}
]

and then

$.length
smaica
  • 723
  • 2
  • 11
  • 26