I want to remove the empty or null from the options array field array data in javascript
Use JavaScript array filter.
arr.forEach((item) => { if(Array.isArray(item.options)) { item.options = item.options.filter((option) => option != null); } }