- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is the replacement of lodash pluck() method?
Pluck has been removed from lodash 4. This is because it did the same thing as a map.
As a replacement, you can use the map function in the following way −
Example
import _ from 'lodash' const objects = [{ 'a': 1 }, { 'a': 2 }]; console.log(_.map(objects, 'a'))
Output
This will give the output −
[1, 2]
- Related Articles
- Where is _.pluck() in lodash version 4?
- What are the differences between lodash and underscore?
- Replacement Cost – Correct method of replacing an existing asset
- What is Page Replacement in Computer Architecture?
- What is the difference between Book Value and Replacement Value?
- How to make filter and word replacement method - JavaScript?
- Best replacement of onItemClickListner in android recyclerview?
- Types of Investments – Expansion, Diversification, Modernization, Replacement
- Integer Replacement in C++
- Difference between .extend() / .assign() and .merge() in Lodash library.
- What is the cleavage method of cytokinesis?
- What is the percentage of the completion method?
- Apostrophe replacement in MySQL query?
- C++ Balanced expression with replacement
- Switch Case in Python (Replacement)

Advertisements