// A known database table data
[{"fileType":"movie","fileUrl":"a.file"}]
// Operate
const table_name = "table_movie"
const insertData = {"fileType":"movie","fileUrl":"b.file"}
await update(
table_name,
insertData,
{"fileType": "movie"}
)
// Log
error: Provided data is not an array please provide array of object to update, Given data
According to the log in the previous section, I made the following changes, but it still doesn’t work
// Operate
const table_name = "table_movie"
const insertData = {"fileType":"movie,"fileUrl":"b.file"}
const new_indertDta = new Array()
new_indertDta.push(insertData)
await update(
table_name,
new_indertDta,
{"fileType": "movie"}
)
// Log
error: Provided data is not an array please provide array of object to update, Given data
According to the log in the previous section, I made the following changes, but it still doesn’t work