Location Path Metadata List

Post Reply
schmitzdp
Member
Posts: 54
Joined: Thu Aug 06, 2020 1:36 pm

Location Path Metadata List

Post by schmitzdp »

Hello,

is there a trick to retrieve the value following the key given in a structure like the one below?

Instead of using this way?

Code: Select all

[Metadata.Text:Dataset="Payload",Model="JSON",Path="/data/fields/2/value"]
Image

Thank you.
User avatar
JimmyHartington
Advanced member
Posts: 456
Joined: Tue Mar 22, 2011 7:38 am

Re: Location Path Metadata List

Post by JimmyHartington »

I try to use the syntax below.

Code: Select all

[Metadata.Integer:Dataset="RollLabel",Model="XML",Path="/field-list/field[tag='TAGNAME']/value"]
This has often helped me with a submit point when adding new fields, so the number changes for the values.
schmitzdp
Member
Posts: 54
Joined: Thu Aug 06, 2020 1:36 pm

Re: Location Path Metadata List

Post by schmitzdp »

I try this but without success.
Have I made a mistake?

Code: Select all

[Metadata.Text:Dataset="Payload",Model="JSON",Path="/data/fields[key='question_8zkRMO']/value"]
or

Code: Select all

[Metadata.Integer:Dataset="Payload",Model="JSON",Path="/data/fields[key='question_8zkRMO']/value"]
User avatar
JimmyHartington
Advanced member
Posts: 456
Joined: Tue Mar 22, 2011 7:38 am

Re: Location Path Metadata List

Post by JimmyHartington »

Sorry. I missed yours data was JSON.
I think my method only works with XML.
freddyp
Advanced member
Posts: 1129
Joined: Thu Feb 09, 2012 3:53 pm

Re: Location Path Metadata List

Post by freddyp »

Correct, Jimmy, your method will only work with XML but it is easy to convert a JSON to XML with "JSON pickup - Pickup result - XML".
Post Reply