There has to be a better way of writing the js in my function....
I need to end up with bare json that looks like this [1095365, 1125504].
Setup of code example;
var article = {"Id":0,"dirtyFlags":null,"textAreas":null,"metaData":null,"relatedCIs":[{"Id":1095365,"Type":4},{"Id":1125504,"Type":4}],"clients":[{"Id":992754}]};
myFunction(article.relatedCIs);
and here's the function i want to optimise;
function myFunction(jRelatedCIs) {
var idArray = [];
$.each(jRelatedCIs, function (i, ci) {
idArray.push(ci.Id);
});
var jIdArray = $.toJSON(idArray);
....other code
}