Convert NLP to SQL Tools
Convert an object to an array (preview)
- 2 minutes to read
Template ID: convertobjecttoarray
Converts a JSON object in the request or response body to an array. This template is available in Power Apps and Power Automate.
First, enter the path to the parent object or collection. Then enter the property sub-path of the parent element in which the array is located. Next, you provide a property name for the key of each child object and a new property name for the properties within each child object. Finally, enter the path in which the new object property will be written.
Some things to keep in mind:
- You can leave the subpath blank if the parent is the array you want to transform.
- To overwrite the existing array, the path would be the parent path and property sub-path previously specified.
- To keep the specified object key as a property within the new object, set the Keep key option to true (this is the default if left blank). Otherwise set the option to "false".
Let's look at some examples that use the following parameters.
|newPropertyPath||@body (). peopleArray|
|keyName||Name of the dataflow|
Example # 2
|propertyParentPath||@body (). sets|
|newPropertyPath||@item (). people|
|keyName||Name of the dataflow|
Note that since the parent is a collection, the transform is applied to each subpath.
Example of an open source connector
We have an instance of this template that is used in our open source connectors repository.
|Planner||Transform a reference object into an array of references in the response for the Get Task Details action.|
|Name of the dataflow||key||Required||Art||description|
|x-ms-apimTemplateParameter.propertyParentPath||Yes||String||Path to the object or collection.|
|x-ms-apimTemplateParameter.propertySubPath||String||Property subpath within the object or collection.|
|x-ms-apimTemplateParameter.newPropertyPath||Yes||String||Path of the new object.|
|x-ms-apimTemplateParameter.keyName||String||Property name for the key.|
|x-ms-apimTemplateParameter.valueName||String||Property name for the value.|
|x-ms-apimTemplate-policySection||Yes||enumeration||Specifies when this policy should run|
- Request: The policy template is executed before the request is sent to the backend API.
- Response: The policy is executed after receiving the response from the backend API.
|x-ms-apimTemplate-operationName||Array||The policy runs on the selected list of actions and triggers. If no operation is selected, this policy applies to all operations.|
- What are the uses of PLCs
- What about GST on a savings account
- What is the molecular formula of vinegar
- How is the earth stable in space
- How do I use Google Face Recognition
- Why does meth make my hands purple
- Have actors ever missed rehearsals?
- Which startups were booted by consulting services
- How does the Geiger Mueller counter work
- How are lawyers expanding their practice
- Should I study film music
- Which are the best hedge funds
- What is FAT vs NTFS
- What is the purpose of a kabuki brush?
- How do you determine what influences someone
- What are some lenskart hacks
- Accept gun purchases, armrests
- What's Eve's real name
- What's the strangest patent you have
- What is the psychological meaning of meditation
- The people of Jamaica celebrate Christmas
- There is free advice for couples
- Who runs the leadership workshops in India
- What are some potato and egg recipes