I have a JavaScript object like
var obj = { key1: \'value1\', key2: \'value2\', key3: \'value3\', key4: \'value4\' }
How can I
if(props.userType){ var data = [] Object.keys(props.userType).map(i=>{ data.push(props.userType[i]) }) setService(data) }