📜  如何使用 lodash javascript 代码示例收集密钥

📅  最后修改于: 2022-03-11 15:01:20.360000             🧑  作者: Mango

代码示例1
import * as _ from 'lodash';

const objectMap = {'key1': 'value1', 'key2': 'value2'};
const allKeys = _.keys(objectMap); //Returns a string[]. Here it will be ['key1','key2'];