locked
Parse Uri Stored as String RRS feed

  • Question

  • Hi,

    I have a webapi that is returning JSON data.  one of the pieces of data is the next page URL that I need to parse to obtain one of the query values.  The string value looks like the following:

    https://subdomain.zendesk.com/api/v2/incremental/tickets/sample.json?per_page=100&start_time=1332034771

    I want to select the start_time value but cannot work out how to do this in LogicApp, I've tried all sorts and am now at a lose.

    Any help much appreciated.

    Regards

    Andrew

    Wednesday, February 12, 2020 6:41 PM

All replies

  • What I generally do in such cases is have common Utility functions created in Azure functions which help me do the things that are not directly possible in Azure functions. That way you can reuse the same function across multiple logic apps.

    What you seek is possible in logic app but the approach would be a bit brittle. I tried following and it read the value of the start_time

    split(split(substring(uriQuery('https://subdomain.zendesk.com/api/v2/incremental/tickets/sample.json?per_page=100&start_time=1332034771'),1),'&')[1],'=')[1]

    But as I said this is really brittle and error prone. You can also use string functions to extract values.

    But  I would say create azure function and use it.


    Mandar Dharmadhikari

    Thursday, February 13, 2020 1:15 AM