createApiCheckboxArray = (arr) => {
/**
* array.keys
*/
arr.map((item, i) => {
if(item.hashKey === i.hashKey){
let valArr = [];
valArr.concat(i.value);
Object.assign({item.hashKey}, valArr)
}
})
///create whole new array : selectedCheckboxesAPI, concat the three Objects to the array
//pass this to handleExtraInfoFormSubmit as checkboxAnswers variable
//remove selectedChecboxesFinal from selectedCheckboxes function
}
Created
September 21, 2018 16:27
-
-
Save andrit/9044bc82dbc73f610d6c250b75820af1 to your computer and use it in GitHub Desktop.
takes a state array, like: 0: { hashKey: "5bdbeca67ac99d2e1389e154044585f8f8639bf5" value: "APPLE"} matches Hashes and puts values into array of values for each exclusive hash
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment