lodash获取数组或对象的值 at
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>获取数组或对象的值</title>
</head>
<body>
<script src="https://cdn.bootcss.com/lodash.js/4.17.10/lodash.min.js"></script>
<script type="text/javascript">
var obj = { 'a': 5};
var arr = [1,2,3,4]
console.log(_.at(obj,'a'))
console.log(_.at(arr,3))
</script>
</body>
</html>
作者:孟繁贵 Email:meng010387@126.com 期待共同进步!