About 206,000 results
Open links in new tab
  1. Find a value in an array of objects in Javascript [duplicate]

    Sep 17, 2012 · I got this answer with the help of @rujmah answer above. His answer brings in the array count... and then find's the value and replaces it with another value... What this answer …

  2. How to find first element of array matching a boolean condition in ...

    May 5, 2012 · I'd honestly have to say this a fairly elegant solution. The closest thing I can find is Array.prototype.some which tries to find if some element satisfies a given condition you pass …

  3. javascript - Check if an element is present in an array - Stack …

    function isInArray(value, array) { return array.indexOf(value) > -1; } Execution: isInArray(1, [1,2,3]); // true Update (2017): In modern browsers which follow the ECMAScript 2016 (ES7) standard, …

  4. javascript - How can I find and update values in an array of objects ...

    The splice() method changes the contents of an array by removing or replacing existing elements and/or adding new elements in place. N.B : In case you're working with reactive frameworks, it …

  5. javascript - Get the last item in an array - Stack Overflow

    Here, there is no need to store the split elements in an array, and then get to the last element. If getting last element is the only objective, this should be used. Note: This changes the original …

  6. Check if an array contains any element of another array in JavaScript

    May 1, 2013 · Array .filter() with a nested call to .find() will return all elements in the first array that are members of the second array. Check the length of the returned array to determine if any of …

  7. How to find if an array contains a specific string in …

    $.inArray is effectively a wrapper for Array.prototype.indexOf in browsers that support it (almost all of them these days), while providing a shim in those that don't. It is essentially equivalent to …

  8. javascript - How to search for a string inside an array of strings ...

    many thanks. seems like my JS code isn't working though. here i'm trying to use this search function, in order to append new text to the array element after which corresponds with the …

  9. Get JavaScript object from array of objects by value of property

    In terms of performance, _.find() is faster as it only pulls the first object with property {'b': 6}, on the other hand, if suppose your array contains multiple objects with matching set of properties …

  10. In Javascript, how do I check if an array has duplicate values?

    Sep 2, 2015 · In this example the array is iterated, element is the same as array[i] i being the position of the array that the loop is currently on, then the function checks the position in the …

Refresh