Please find the correct usage configuration of this action
Action: Json - Extract properties from a Json object
Observation: Don't use JSON-path in this but just enter the property name you are looking for. For example I am looking for application1 and I know it will be returning an string Array. In case if you want to extract further as you can see the output in below action is another JSON object. The action only going to extract the first level properties.
Inputs:
Json Object { "application1": [ { "it": [ "it server application 1" ], "ft": [ "ft it server application 1" ], "stg": [ "stg server 1 application 1", "stg server 1 application 1" ], "prd": [ "prd server 1 application 1", "stg server 1 application 1" ] } ], "application2": [ { "it": [ "it server application 2" ], "ft": [ "ft it server application 2" ], "stg": [ "stg server 1 application 2", "stg server 2 application 2" ], "prd": [ "prd server 1 application 2", "stg server 2 application 2" ] } ] }
Property 1
Property 2
Property 3
Array Property 1 application1
Array Property 3
Array Property 2
Outputs:
Property Value 1
Property Value 2
Property Value 3
Array Property Value 1 [{"prd":["prd server 1 application 1","stg server 1 application 1"],"stg":["stg server 1 application 1","stg server 1 application 1"],"it":["it server application 1"],"ft":["ft it server application 1"]}]
Array Property Value 2 []
Array Property Value 3 []
Action: Json - Execute Multiple Queries Using JSONPath
Observation: Here I used the JSON-Path you shared and all returned the correct value.
Inputs:
Json Object { "application1": [ { "it": [ "it server application 1" ], "ft": [ "ft it server application 1" ], "stg": [ "stg server 1 application 1", "stg server 1 application 1" ], "prd": [ "prd server 1 application 1", "stg server 1 application 1" ] } ], "application2": [ { "it": [ "it server application 2" ], "ft": [ "ft it server application 2" ], "stg": [ "stg server 1 application 2", "stg server 2 application 2" ], "prd": [ "prd server 1 application 2", "stg server 2 application 2" ] } ] }
JSONPath Query1 $.application1[*].it
JSONPath Query2 $.application1[0].it[0]
JSONPath Query3 $.['application1'][*].['it']
JSONPath Query10
JSONPath Query9
JSONPath Query8
JSONPath Query7
JSONPath Query6
JSONPath Query5
JSONPath Query4
Outputs:
JSONPath Result1 [["it server application 1"]]
JSONPath Result2 it server application 1
JSONPath Result3 [["it server application 1"]]
JSONPath Result4
JSONPath Result5
JSONPath Result6