Set app variable from json output

This is a very noob question, I’m posting a HTTP request and getting an output:

how can I get the property value of phonenumber and set is to a page variable?

Hi! If I understand correctly, I would do this via formula in the set page variable logic node. Type output into the formula editor and it should offer you those properties.

Hi @Mevi I’m already getting the output of the post request.
I used forumals “outputs[“HTTP request”].resBodyParsed” and it gives me the result {“status”:1,“color”:"#479758",“phonenumber”:"+12027953213"}.

what I want is to get “phonenumber:” value only and save it in a app variable.

I wanted to try this tutorial too… but I’m not able to write anything in the code edit area. it looks like disabled.

1 Like

You can use LOOKUP() to find the correct property from an Object. Your Formula would then look something like this:

LOOKUP(outputs[“HTTP request”].resBodyParsed, "phonenumber")

And about the Javascript box: I’ve also seen that a couple of times that the center area is left empty. I think clicking on that area with your mouse should help (if I remember those cases correctly). Or maybe closing and opening the Javascript Flow function could help. If not, try refreshing the page. In any case I’ll make sure we look into this issue as this shouldn’t happen.

Thank you so much @Tomi_Laakso your solution worked! :pray:

1 Like