I'm using the confluence API. As a response value to the https GET request Suppose you want to get the following data example.
body = {results = [{ope = abc, rest = {user = {results = [{xxx, Id = 12345}]}}, ope = def, rest = {user = {results = [{xxx, Id = 67890}]}}]}
I want to get only Id = 12345 from the above data example. If you specify "body.results.rest.user.results.Id", two Id = 12345 and Id = 67890 will be specified.
If you want to get only the first Id = 12345, you will get it. How should I modify "body.results.rest.user.results.Id"?
Hi @青山 明
Use jq tool to extract data from JSON Body
Please find the reference here for documentation
https://stedolan.github.io/jq/manual/#Basicfilters
Thanks,
Pramodh
I would like you to give a concrete example.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please use the example below.
body = {results = [{ope = abc, rest = {user = {results = [{xxx, Id = 12345}]}}, ope = def, rest = {user = {results = [{xxx, Id = 67890] }]}}]}
How can I modify the smart values below?
{{body.results.rest.user.results.Id}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is there anything in my question that doesn't make sense?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Shows some of the "webResponse" information after the response.
I am trying to get data based on that information.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Was self resolved. thankyou
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.