Jump to content

Displaying Json Results

Recommended Posts

  • Replies 4
  • Views 1.4k
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

The first question to answer is what display format would you like it to be in?

JSON can be reformatted with JavaScript into a number of other display formats.

Is the code you mention just the raw JSON output from the API or are you calling the API on the fly and it returns JSON to you in a code block?

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

Thanks @creedon.

Yes. I tried to reformat with JavaScript. I tried a couple of simple codes in code block but it just displays the code as is in preview and saved mode (I signed up for the business plan and this should not be an issue because of trial/ basic subscription per help center).

The latter option would be awesome, getting real time results from the API. Do you know if it can work in a code block?

Link to comment

Sounds like you turned the Display Source Code toggle on. It should be off to run code.

ScreenShot2023-09-05at3_48_37PM.png.b62764e05f01f43b782cd38aca16db71.png

I have no clue if the API can be used real time. You would need to read up on the docs from the API provider. Many providers charge a fee to use their API and that may vary based on volume of calls.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.