PricingBlog

Noob alert, how to formart something like this?

  • shiva_46019-1282002250184527913

    shiva

    1 year ago

    {"line1":"16 Boundary Stone Lane","line2":null,"city":"Widnes","postal_code":"WA8 3AJ","country":"UK","type":"billing","addressee"}
  • andreasmoller-1282020922206847056

    Andreas Møller

    1 year ago

    That’s and object is the formula editor, if you want it as text then you can use the “encode json” formula
  • shiva_46019-1282024970201071640

    shiva

    1 year ago

    looks even worse
    1282024970280501380-image.png
  • andreasmoller-1282025425530388520

    Andreas Møller

    1 year ago

    Ah. Ok you have the json string 🙂

    You can decode the json string first, then encode it with 2 indent
  • Alternatively you can just decode it and use the json viewer package
  • shiva_46019-1282033144857628673

    shiva

    1 year ago

    how to decode htough?/
  • tomthebigtree-1282039853487362188

    Tom Ireland

    1 year ago

    Hey, shiva. Not sure what you mean. The JSON format in the description is what you have coming back from the API, so you shouldn't need to encode it. What are you trying to do for the 'Address:' field?
  • shiva_46019-1282040105451651102

    shiva

    1 year ago

    just wanna show the address there buddy
  • but thats how I am getting it from the database
  • tomthebigtree-1282044612621631620

    Tom Ireland

    1 year ago

    Ah, okay. It wasn't immediately obvious. I wasn't sure if you wanted to format something as JSON, which is how the post reads, or format JSON as something else. If you take away the Encode JSON for a moment, what does the result display (as a screenshot and expanded)? It should show an object with key/value pairs.
  • tomthebigtree-1282045071583219874

    Tom Ireland

    1 year ago

    As a note for future issues, when you ask "how to format something like this?", it's also helpful to include how you want to format it. Saves going down rabbit holes because of misinterpretation. 😉
    💪1