How to parse this data in a constant

https://pastebin.com/raw/293ULTzN

how to do it in OB2

the last function

You cannot do this with a single block in OB2 you need to loop, see a guide here

Damn tough for me :stuck_out_tongue:

Can you do like this for me in OB2 lolicode

PARSE "<SOURCE>" JSON "reward_certificate_number" Recursive=TRUE -> VAR "Rewardc" 
PARSE "<SOURCE>" JSON "online_certificate_code" Recursive=TRUE -> VAR "Onlinec" 
PARSE "<SOURCE>" JSON "reward_amount" Recursive=TRUE -> VAR "Bal" 
PARSE "<SOURCE>" JSON "active_date" Recursive=TRUE -> VAR "Starts" 
PARSE "<SOURCE>" JSON "expiration_date" Recursive=TRUE -> VAR "Ends" 
FUNCTION Constant "[<Rewardc[*]>:<Onlinec[*]>] Holds: <Bal[*]> Starts at: <Starts[*]> Ends at: <Ends[*]>" -> CAP "Code"

Sorry I don’t have time, please try yourself following the guide.

Otherwise you can use the zip function to join lists, maybe it’s easier for you. Join the first with the second with the pattern you want, and then join with the third etc, I think this option is much easier!

1 Like