Okay
  Public Ticket #3378462
JSON parameter for ​Multiple select
Closed

Comments

  • Roman started the conversation

    Hello,

    have a question about errors by JSON parameter for Multiple select. Error message: "Please provide a correct format for the cell."

    This two cells making error:

    "OperationRegion": [ "Germany", "Italy" ],
    "Cooperation": [ "FBA", "eBay", "DHL" ],

    What is right Please check example below.

    Greetings,

    Attached files:  test2.json

  • Roman replied

    Syntax was wrong.

    Right must be:

    "OperationRegion": "Germany, Italy",
    "Cooperation": "FBA, eBay, DHL" ,

  •  1,848
    Miloš replied

    Hi, Roman.

    Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.

    -

    I am delighted to hear that you found the error in the syntax. Thank you for letting us know what was wrong.

    Generally speaking,  when working with sources such as JSON/Nested JSON/ or API,

     

    1. If you link the table to a JSON file, this file has to have structure as we pointed out on this documentation. I will copy the important part here :

     Currently, wpDataTables accepts this, and only this format of JSON (see example on the docs page): 

    a one-level array of same-structured objects where each object will be parsed as a row, and each field inside of the object as a cell.

    -

     If your software does not return this format, you would need to prepare, for example, some PHP adapter to return one of the formats that wpDataTables would accept.

    -

    2. If your JSON file has multiple levels, then you will have to try our NESTED JSON method.



    3. If you wish to use API, and to pull data from it,  then you will have to adapt it to PHP Array, and make a table linked to PHP Array.


    Please don't hesitate to open new tickets if anything else comes up, we will do our best to advise.

    Thank you.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables