I published data like _attachments
:
I want to prepare this data for insertion as the following structure:
"_attachments": [ { "container": "string", "fileName": "string", "name": "string", "mime": "string", "size": 0 } ]
But what I did:
for(let key in _attachments) { job._attachments[key]['container'] = _attachments[key]['container']; job._attachments[key]['fileName'] = _attachments[key]['fileName']; job._attachments[key]['name'] = _attachments[key]['name']; job._attachments[key]['mime'] = _attachments[key]['mime']; job._attachments[key]['size'] = _attachments[key]['size']; }
enter this error:
Unprocessable Entity
Note. I am using loopback.
source share