当前位置:网站首页>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
边栏推荐
- PMP project management exam pass Formula-1
- Wechat forum exchange applet system graduation design completion (8) graduation design thesis template
- 在软件工程领域,搞科研的这十年!
- Kubernetes' simplified data storage storageclass (creation, deletion and initial use)
- Opencv scalar passes in three parameters, which can only be displayed in black, white and gray. Solve the problem
- ./ setup. Insufficient sh permission
- 高级程序员必知必会,一文详解MySQL主从同步原理,推荐收藏
- kubernetes的简单化数据存储StorageClass(建立和删除以及初步使用)
- Description of longitude and latitude PLT file format
- 违法行为分析1
猜你喜欢
GEE(四):计算两个变量(影像)之间的相关性并绘制散点图
Description of longitude and latitude PLT file format
Mysql索引优化实战一
LeeCode -- 6. Z 字形变换
Adults have only one main job, but they have to pay a price. I was persuaded to step back by personnel, and I cried all night
经纬度PLT文件格式说明
Brush question 3
LDO稳压芯片-内部框图及选型参数
在软件工程领域,搞科研的这十年!
Wechat forum exchange applet system graduation design completion (1) development outline
随机推荐
V20变频器手自动切换(就地远程切换)的具体方法示例
What are the similarities and differences between smart communities and smart cities
USB (十七)2022-04-15
648. 单词替换
Network security - Eternal Blue
Quelles sont les similitudes et les différences entre les communautés intelligentes et les villes intelligentes?
VS扩展工具笔记
Handling file exceptions
在软件工程领域,搞科研的这十年!
嵌入式音频开发中的两种曲线
Network security - phishing
Mysql索引优化实战一
三问TDM
UE4_UE5蓝图command节点的使用(开启关闭屏幕响应-log-发布全屏显示)
Solution: prompt "unsupported video format" when inserting avi format video into the message
Wechat forum exchange applet system graduation design completion (8) graduation design thesis template
opencv scalar传入三个参数只能显示黑白灰问题解决
OC variable parameter transfer
re1攻防世界逆向
微信论坛交流小程序系统毕业设计毕设(3)后台功能