Support Topics Documentation Slack YouTube Blog

Import Json Data with Sub Array

Hi,

I really love your IMPORT feature on the Database via the REST CONSOLE, and also the MANAGE button.

My json file is:

{
‘name’: ‘sample name’,
‘address’: ‘sample address’,
‘items’: [{
‘title’: ‘sample’,
‘subtitle’: ‘sample’
},
{
‘title’: ‘sample’,
‘subtitle’: ‘sample’
},
{
‘title’: ‘sample’,
‘subtitle’: ‘sample’
}]
}

But when i import via both ways, only the top level fields got important, and the sub level one not (eg the ‘items’).

Is there something i need to do for this to import properly ?

Hi @Lester_Tan

Actually, the REST Console doesn’t import data, it’s built for CRUD operations. So when you click at POST button you just save objects, but for establishing relationships between objects you have to make an additional request. You can read more about data relations here: https://backendless.com/docs/js/data_relations.html

docs for import you can find by the following link: https://backendless.com/docs/js/mgmt_import.html#relations

Regards, Vlad