Search code examples
jsonpower-automate

Json Data specific array value extraction in Power Automate


I am trying to just extract the "link" section of the Json Object in power automate so I can use it in an approval flow, but I can't seem to get it to work.

  "r36bb9fe3e73a4d7795270d677184cb6f": "[{
\"name\":\"SharePoint Migration (3)Test.pdf\",
\"link\":\"https://sharepoint.com/sites/itsupportteam/Shared%20Documents/Apps/Microsoft%20Forms/DAX%20System%20Change%20Form/Question%202/PGP%20SharePoint%20Migration%20(3)_%rs%201_%2%202.pdf\",
\"id\":\"0154HRNBH2YXO7CMVJXZFKPCJTHULQKHIG\",
\"type\":null,
\"size\":704369,
\"referenceId\":\"0154HRNBHF2E6BYY6MDFBJB544JYFRENX6\",
\"driveId\":\"b!WGvvdSUIdUO8jh9P9Va9g4HiJ5ga56FMqTu18Yjhg-CqoBoNX5qGQp-92fONEnfc\",
\"status\":1,
\"uploadSessionUrl\":null}]"
}

Is it possible to just extract the "link" and save it to a variable so I can use it as Dynamic Content.


Solution

  • It will be something similar to:

    first(
     json(
      outputs('yourAction')?['body/value/r36bb9fe3e73a4d7795270d677184cb6f']
     )
    )?['link']