Inserting fetch response into a collection

Hello Eddie,

If you are looking to store everything from the request, a good way to do this would be to insert them this way:

wixData.insert("myCollection", data[0].address_info.statues)
  .then((record) => {
    console.log(`record inserted: ${record}`);
    wixData.insert("myCollection", data[0]['property/sales_history']).then((rec)         => console.log(`rec inserted: ${rec}`));
  }).catch((err) => {
    console.log(err, "see error if there is here")
  });

This is assuming that the property/sales_history property doesn’t have anything nested in it, as we want it to be the same format as address_info.statues (no nesting)

Hope this helps,
Majd