Skip to end of banner
Go to start of banner

How to retrieve data from JSON file when the fields include white spaces in them

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

This article helps in getting the data from the JSON files for the fields which have white spaces included in them.

Instructions

  1. Log in to Confluence.
  2. Insert the JSON Table macro in a Confluence page.
  3. Input the JSON data through the Method of locating script or follow the instructions mentioned in the Build an Advanced Table from Rest API Data 8.x article and save the macro settings.
  4. The article in Step 4 works fine if the field names don't have any white spaces included in them.
  5. If there are white spaces included in the field names, for example from the JSON data shown below, the fields named App Name and Product Category, then the result will be:

    [{"Tools":["Both"],"Role":["Support Engineer"],"Name":["K S"],"User":["test.user"],"App Name":["Bobswift"],"Product Category":["BI reporting"]}]




  6. To avoid this error, the field names should be given as ['App Name'],['Product Category'], then the results are as shown below


  7. Save the settings and Publish the page.

  • No labels