简体   繁体   中英

Retrieve the name of a Json property in logic apps

Hi i was wondering if there is a way to extract/retrieve/get the name of a property from a Json object in logic apps.

Whet i have is an XML embedded in a Json object (don't ask me why, please)

What i am doing is to convert/parse the content (the xml) inside the Json object, to Json. I want to be able to get the name of a specific property.

This is what i have for now:

json(xml(outputs('Compose')['xmlObject']))?['RootProperty']['SubProperty']

What i get is the content/data inside the property "SubProperty". What i want to get as a result is the name/phrase "SubProperty", That is the name of it.

Is this possible?

EDIT:

So what i mean is that i want the name of the node i''m selecting in simple terms.

So in stead of getting a result of whats IN "SubProperty", That is:

在此处输入图片说明

i Want the name of the parent node so to speak. That is "SubProperty", as a result.

在此处输入图片说明

Unfortunately, the JSONPath spec(s) do not have a way to return metadata about a document, such as element names.

You'd have to work around this in some very circuitous way such as converting the JSON to Xml or a JavaScript to .parse() the JSON and treat it as an object.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM