var dataArr = [
{number: 1, workId: [0], storyIds: [0]},
{number: 2, workId: [0], storyIds: [0]},
{number: 3, workId: [1], storyIds: [10]},
{number: 4, workId: [2], storyIds: [10]},
{number: 5, workId: [3], storyIds: [20]}
];
console.log(dataArr.filter((v) => !!v.storyIds[0]))
More Related Contents:
- get all 3 digit number whose sum is 11 or we can say module is 1 in JS [closed]
- How do I test for an empty JavaScript object?
- How can I merge properties of two JavaScript objects dynamically?
- How to return value from an asynchronous callback function? [duplicate]
- How to iterate over a JavaScript object?
- Check if a value is an object in JavaScript
- Converting JavaScript object with numeric keys into array
- Why can I add named properties to an array as if it were an object?
- Are Javascript arrays primitives? Strings? Objects?
- Anonymous class instance —- is it a bad idea?
- How to transpose a javascript object into a key/value array
- Sorting arrays numerically by object property value
- How to copy JavaScript object to new variable NOT by reference? [duplicate]
- How to sum the values of a JavaScript object?
- What is the difference between native objects and host objects?
- Create object from array
- Comparing two arrays of objects, and exclude the elements who match values into new array in JS
- Mongoose/MongoDB result fields appear undefined in Javascript
- What’s the difference between “{}” and “[]” while declaring a JavaScript array?
- Setting a variable equal to another variable [duplicate]
- Maps vs Objects in ES6, When to use?
- JavaScript, elegant way to check nested object properties for null/undefined [duplicate]
- Access JavaScript Object Literal value in same object [duplicate]
- Search array of objects for entry matching variable and check if it matches other fields
- Elegant way to copy only a part of an object [duplicate]
- Using JavaScript what’s the quickest way to recursively remove properties and values from an object?
- How to merge each object within arrays by index?
- Access numeric properties of an object using dot notation
- Convert array of objects to array of arrays
- Array of object deep comparison with lodash