Parse JSON payload containing array
Hello,
I have a flow which receives a json payload (as a webhook).
I need to set a variable (using the zoho Flow "Set a variable" module) which gets data from the json payload.
It works as long as I refer to json objects properties, even with several levels:
- ${webhookTrigger.payload.agentName}
But it fails as soon as I try to access data in an array:
- ${webhookTrigger.payload.resultObject[0].general.fullName}
=> What is the right syntax to access data contained in an array inside the JSON payload ?
Here is a sample payload
{
"webhookTrigger": {
"payload": {
"runDuration": 28100,
"agentId": 8969430073133485,
"launchDuration": 579,
"agentName": "LinkedIn Profile Scraper (1)",
"exitCode": 0,
"exitMessage": "finished",
"scriptOrg": "phantombuster",
"containerId": 7373200360528184,
"branch": "master",
"resultObject": [
{
"general": {
"imgUrl": "https://media-exp1.licdn.com/dms/image/C4D03AQHdp9paXpkRmg/profile-displayphoto-shrink_800_800/0/1538765942254?e=1669852800&v=beta&t=LriruF9o3TNMsCbS7h3z7F394fNF1Ayzq_ZpAaIjF7Q",
"fullName": "Gilles Combes",
"headline": "Responsable technique à CARTELAND\nSymfony - AWS - Docker - Linux",
"location": "Aix-en-Provence, Provence-Alpes-Côte d’Azur, France",
"profileUrl": "https://www.linkedin.com/in/gillescombes/",
"connectionDegree": "2e",
"mutualConnectionsUrl": "https://www.linkedin.com/search/results/people/?facetNetwork=%5B%22F%22%5D&facetConnectionOf=%5B%22ACoAAAJYssIBGfX9KgXg5EptUGMDixIl-G9ocfE%22%5D&origin=MEMBER_PROFILE_CANNED_SEARCH&RESULT_TYPE=PEOPLE",
"mutualConnectionsText": "4 relations en commun : Boris BRAUN, Clarisse Hébréard et 2 autres personnes",
"description": "",
"subscribers": 228,
"firstName": "Gilles",
"lastName": "Combes",
"userId": 39367362,
"vmid": "ACoAAAJYssIBGfX9KgXg5EptUGMDixIl-G9ocfE",
"linkedinSalesNavigatorUrl": "https://www.linkedin.com/sales/people/ACoAAAJYssIBGfX9KgXg5EptUGMDixIl-G9ocfE,name",
"connectionsUrl": "https://www.linkedin.com/search/results/people/?facetConnectionOf=%5B%22ACoAAAJYssIBGfX9KgXg5EptUGMDixIl-G9ocfE%22%5D&facetNetwork=%5B%22F%22%2C%22S%22%5D&origin=MEMBER_PROFILE_CANNED_SEARCH",
"connectionsCount": 230,
"company": "CARTELAND"
},