Using json data from another field

Comments

6 comments

  • Rainer Grabowski

    Hi Jean-Claude, search a bit in the questions. There are 2 others JSON-related questions with solutions.

    0
    Comment actions Permalink
  • Jean-Claude Massé

    Very sorry for that! I check this before and found only thread about API. Maybe i didn't search correctly.
    Here's the answer: https://help.podio.com/hc/communities/public/questions/202620823-Using-calulation-field-javascript-to-parse-JSON

    Thanks a lot.

    0
    Comment actions Permalink
  • Gus H.

    Hi Jean-Claude. Did you have any luck with getting the distance "number", or should we continue to harass Rainer? For the life of me I cannot get "var pattern" regex to extract the number. Thank you.

    0
    Comment actions Permalink
  • Jean-Claude Massé

    Hi Gus. Not sure to understand what is your Issue? Also, do you get your data using Globiflow? You can now parse json into GF.

    Do you check the other post from my previous comment?

    0
    Comment actions Permalink
  • Gus H.

    Hi Jean-Claude. So sorry, I totally ignored the other GF Forum Dimension we have....  As for GF, I am trying to go easy on my flows over there. Man, they add up so quickly. If it can be done in Podio, I'd rather save GF for mission-impossible.

    Here it is for anyone who is interested in parsing Google Matrix JSON for distance and/or time between Point A and B. It works for me, Thanks Jean-Claude for starting this post.

    try {
    String(JSON.parse(@Distance JSON).rows[0].elements[0].distance.text);
    } catch (e) {
    "Could not parse JSON"
    };

    I still cannot remove the word "ml" for miles after parsing the mileage number. :-(

    0
    Comment actions Permalink
  • Jean-Claude Massé

    You can try to put your result in a var miles = ...code...

    and... miles.replace("ml","")

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk