Hi everybody,
I have an issue with something that should be easy and might be reason why I don't find any threads pointing me towards the right solution:
I have an HHTP-Post / Receive HHTP request workflow in which I am posting a JSON array. It is received properly but then I have the challenge of not being able to retrieve individual items from the object. So you understand better here is the JSON I receive:
[
{
"Filename": "XXXXXXXXXXXXXX",
"Path": "https://jnj.sharepoint.com/teams/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.xls"
},
{
"Filename": "XXXXXXXXX",
"Path": "https://jnj.sharepoint.com/teams/XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.xlsm"
}
]
I now want to access the individual filenames and their according paths individually. This is because I want to create a Planner Task in the next step that is ONE task but contains both JSON results in the task description.
Anyone knowing how to achieve this?
Thank you and best regards
JHL
Solved! Go to Solution.
@JHL1 please find the flow:
Details:
{
"type": "array",
"items": {
"type": "object",
"properties": {
"Filename": {
"type": "string"
},
"Path": {
"type": "string"
}
},
"required": [
"Filename",
"Path"
]
}
}
Parse json schema in above block
output
I added 1 at the end of xx to identity if flow works fine.
Hope this helps.
--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
@JHL1 please find the flow:
Details:
{
"type": "array",
"items": {
"type": "object",
"properties": {
"Filename": {
"type": "string"
},
"Path": {
"type": "string"
}
},
"required": [
"Filename",
"Path"
]
}
}
Parse json schema in above block
output
I added 1 at the end of xx to identity if flow works fine.
Hope this helps.
--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
@jinivthakkar Thank you for your help🙏🙏.
You pointed me towards the right direction. I added an 'append to string'-variable at the end of the Ate-loop. Succeeding the Ate-loop I then I split the string by a delimiter I also added in the Ate-loop. Following that I then write the individual values to individual variables.
This is not very elegant, yet effective.
I will accept your response as solution but keep wondering if there is a more elegant approach for what I am after. I mean think about if I instead of two values, as right now, had to extract 20 or even only 5. Way to manual handling for my taste. Any ideas on that @jinivthakkar or anyone else?💪💪🧐🧐
Thanks again and have a good one💪💪