2

I need to import some data into a table field.

What's the best way to format the data in my original JSON feed?

I've tried this:

[
    "first value",
    "second value",
]

and this:

[
    {"col1": "first value"},
    {"col2": "second value"},
]

But neither of those JSON formats seems to be importing the data properly.

How should I format my data in JSON, so that it may be imported into a table field?


MORE INFORMATION

I've read these docs, but apparently I'm still doing something wrong.

My current JSON looks like this...

"altTitles": [
    {
        "title": "Morke"
    }
]

Where altTitles is my table field, and title is the only column.

I believe I've properly mapped the field...

mapping

Yet for whatever reason, the table fields are not populating...

empty table

Lindsey D
  • 23,974
  • 5
  • 53
  • 110

1 Answers1

3

You can do this a number of ways, and essentially just need an array-like structure to represent the rows.

"Table": [
  {
    "one": "Option1",
    "two": "Option2"
  },
  {
    "one": "Option3",
    "two": "Option4"
  }
]

This issue might be related to your feed however. In the dropdown, you have <altTitles> eg: - there should be a value from your feed in there. According to your example, you should also be mapping to altTitles/title.

My example above shows:

enter image description here

crawf
  • 3,552
  • 14
  • 27
  • Looks like I had it mapped to altTitles... I didn't even see that altTitles/title was there! Thanks crawf, you're a lifesaver! – Lindsey D May 26 '17 at 23:32