当前位置:网站首页>JS get the key and value of the object
JS get the key and value of the object
2022-07-07 23:20:00 【Blue fatty's Dora A Dream】
js Get the object's key and value
Get the object's keys Array :Object.keys(obj)
Get the object's values Array :Object.values(obj)
let obj = {
name: ' Zhang San ',
age: 30,
sex: ' male '
}
console.log(obj)
console.log(Object.keys(obj))
console.log(Object.values(obj))
obtain keys One of the first : Object.keys(obj)[0] // name
边栏推荐
猜你喜欢
JMeter-接口自动化测试读取用例,执行并结果回写
Cloud native is devouring everything. How should developers deal with it?
微信论坛交流小程序系统毕业设计毕设(8)毕业设计论文模板
海内外技术人们“看”音视频技术的未来
PMP project management exam pass Formula-1
Wechat forum exchange applet system graduation design (2) applet function
微信论坛交流小程序系统毕业设计毕设(3)后台功能
13、 System optimization
三问TDM
二叉树(Binary Tree)
随机推荐
Network security - install CentOS
oc 可变參数传递
嵌入式音频开发中的两种曲线
Brush question 4
About idea cannot find or load the main class
漏洞复现----49、Apache Airflow 身份验证绕过 (CVE-2020-17526)
经纬度PLT文件格式说明
云原生数据仓库AnalyticDB MySQL版用户手册
Mitsubishi PLC SLmP (MC) protocol
Network security -beef
Technology at home and abroad people "see" the future of audio and video technology
Bit operation
Vs extension tool notes
ROS2专题(03):ROS1和ROS2的区别【01】
Adrnoid开发系列(二十五):使用AlertDialog创建各种类型的对话框
微信论坛交流小程序系统毕业设计毕设(2)小程序功能
深入理解Mysql锁与事务隔离级别
FPGA基础篇目录
在软件工程领域,搞科研的这十年!
USB(十六)2022-04-28