Array Of Objects To Array Of Array Came As A String
I have JSON object oAtt declared as var oAtt = MessageStore.message().attachments(); MessageStore.message() is declared in the code available here: https://github.com/RainLoop/rain
Solution 1:
I cannot reproduce your problem. What is oArr
tho? You are talking about oAtt
and aAtt
in your code.
var oAtt = [{
"sModelName": "AttachmentModel",
"disposables": [],
"mimeType": "application/pdf",
"fileName": "sample.pdf",
"fileNameExt": "pdf",
"fileType": "pdf",
"description": null,
"estimatedSize": 19333,
"friendlySize": "19KB",
"isInline": false,
"isLinked": false,
"isThumbnail": false,
"cid": "",
"cidWithOutTags": "",
"contentLocation": "",
"download": "zyfTZvzczVW6cqlcsIrm3ycmY5soz3DzK5sZhjnSOwaW0wnwGwHtqBvPeo8nVpiWD4yKVIPvAPauJHZufHGRG0Eb4MRmBpkGlvsDGP-gz3CnVp4GorN_xXCI0Gkd2I93IySKMy5iXRt-wML9wxLwTZcrOMLyPp-Kr6b0GlzlHuvk3RqEXRqSlCQTX5piRO6AaRYeMKeq8PSJcId1grMYzFpCnjVSoW_Zj7yTGAsy-D_mzFoCmBdksCweEqPdGhFYFkukblXzaZiTSNGTj1xYOvMIN4XXUZtU0EAPoQ9EFxfPWY_-1Siyge0Gks2zbGs3myxXJg..",
"folder": "INBOX",
"uid": "22",
"mimeIndex": "2",
"framed": false
},
{
"sModelName": "AttachmentModel",
"disposables": [],
"mimeType": "image/jpeg",
"fileName": "test4.jpg",
"fileNameExt": "jpg",
"fileType": "image",
"description": null,
"estimatedSize": 26326,
"friendlySize": "26KB",
"isInline": false,
"isLinked": false,
"isThumbnail": true,
"cid": "",
"cidWithOutTags": "",
"contentLocation": "",
"download": "BN0gFmNTTOarHTn7bDrdaLxLQ-HmO36mmT8av0rwGMsO9XeBlK7OWBq4uiR5N3RkgjXBwwDtOcLBTPIx-354pFHsV2BigaNfpvFG7XlkFYyCsOwGQcNS2pR_U53ISNCnDV-bZYNjl6dc-XAPb71qOkkxn-XxWCtfqJl5ngPPQ67owcZUUfIv9ddSsGyX5PhMljxyMq6f_Cz6dp07Xeaex89ED35VTqyJe4C1MyAxq92fJlxBstcj7dM12YbRJzzWeS_B9t6g48mwh-0am6c28uxPAGYc_EP4C3VweITw7Q5uhTtNmycMksTu4CIVepYn",
"folder": "INBOX",
"uid": "22",
"mimeIndex": "3",
"framed": false
}
];
var aAtt = oAtt.map(({fileName}) => [fileName]);
console.log(oAtt);
console.log(aAtt);
Post a Comment for "Array Of Objects To Array Of Array Came As A String"