英文:
How to create multiple variables from a variable with a long raw in SAS
问题
Here are the translations of the variable names and their corresponding responses:
- 设备宽度 (corresponds to response of "screenW":)
- 设备高度 (corresponds to response of "screenH":)
- 触摸 (corresponds to response of "touch":)
- 设备操作系统 (corresponds to response of "OS":)
英文:
I am having trouble creating multiple variables from one long row. See below example,
{"screenW":1098,"screenH":618,"touch":true,"OS":"Windows","UTCoffset":300}
I would like to create 4 variables using the above row:
- Device_width (corresponds to response of "screenW":)
- Device_height (corresponds to response of "screenH":)
- Touch (corresponds to response of "touch":)
- Device_OS (corresponds to response of "OS":)
Thank you!
答案1
得分: 3
JSON库引擎将解析JSON数据集。
示例:
filename mydata 'c:\temp\mydata.json';
data _null_;
file mydata;
put '{"screenW":1098,"screenH":618,"touch":true,"OS":"Windows","UTCoffset":300}';
run;
libname info json 'c:\temp\mydata.json';
proc copy inlib=info out=work;
run;
英文:
The JSON library engine will parse json into data sets.
Example:
filename mydata 'c:\temp\mydata.json';
data _null_;
file mydata;
put '{"screenW":1098,"screenH":618,"touch":true,"OS":"Windows","UTCoffset":300}';
run;
libname info json 'c:\temp\mydata.json';
proc copy inlib=info out=work;
run;
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论