I am working with an array named answers
on my webpage, which has the following structure:
answers[{x: 1, r: true;},{x: 2,r: false;},{x: 3, r: true;}]
I believe I have defined this correctly. The answers array consists of a variable number of rows (in this case it's three but it could vary up to ten). Each row includes an x
field and an r
field.
I need assistance in finding a way to extract only the r
field from each row of the answers array and add them to the following object:
$scope.so.xHeaders[fromParams]