JSFiddle - React, Tailwind, and code Playground
by vasi_32
HTML
<select id="demoApp">
</select>
JavaScript
var a = {
"completed":true,
"totalItems":98891,
"items": [
{"ia_biserial":"",
"ia_bloomstaxonomy":"Creating"
,"ia_correctanswer":"",
"ia_difficulty":"High",
"ia_dok":"IV",
"ia_extid":"231617",
"ia_gradelevel":"GradeK",
"ia_hasimages":"False",
"ia_itemid":1,
"ia_lang":"English",
"ia_pointvalue":"2",
"ia_pvalue":"",
"ia_subject":"Math",
"ia_teitype":"OR","ia_vendorid":"i-321813",
"passages":[],
"standards":[]
},
{
"ia_biserial":"",
"ia_bloomstaxonomy":"Creating",
"ia_correctanswer":"",
"ia_difficulty":"High",
"ia_dok":"IV",
"ia_extid":"231616",
"ia_gradelevel":"GradeK",
"ia_hasimages":"False",
"ia_itemid":2,
"ia_lang":"English",
"ia_pointvalue":"2",
"ia_pvalue":"",
"ia_subject":"Math",
"ia_teitype":"OR",
"ia_vendorid":"i-321812",
"passages":[],
"standards":[]
},
]
}
var _getItem = a.items;
var _filter = []
_getItem.forEach(function(item){
_filter.push(item.ia_itemid)
})
console.log(_filter);
var _options ="";
_filter.forEach(function(item){
_options +='<option value="demo_'+item+'">'+item+'</option>'
})
$("#demoApp").append(_options);