Expression to get only item of an array

78 views
Skip to first unread message

Hameeda Sultana

unread,
Jun 15, 2016, 1:45:02 AM6/15/16
to JsonPath
Hi 

I want to extract the only element from an array, which is a result of the filter expression. 

$.[filterExpression][0] is not giving the result. 

Below is the JSON result of filter expression. 
[
            {
                "category": "reference",
                "author": "Nigel Rees",
                "title": "Sayings of the Century",
                "price": 8.95
            }
]          

Warwick Hunter

unread,
Jul 12, 2016, 7:27:06 PM7/12/16
to JsonPath
When I apply the JSON path of $[0] to the results of filterExpression I get the value below.

{category=reference, author=Nigel Rees, title=Sayings of the Century, price=8.95}

What is the filterExpression and what is the full JSON you apply it to?

郭玉昆

unread,
Oct 17, 2016, 11:36:22 PM10/17/16
to JsonPath
I have same problem,

在 2016年6月15日星期三 UTC+8下午1:45:02,Jasmine写道:
Reply all
Reply to author
Forward
0 new messages