对于循环JSON,角度为每次重复该值 [英] For loop JSON in angular to repeat the value each time
本文介绍了对于循环JSON,角度为每次重复该值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
$scope.invoice = {
"Inputs": {
"input1": {
"ColumnNames": [
"instant",
"dteday",
"season",
"yr",
"mnth",
"hr",
"holiday",
"weekday",
"workingday",
"weathersit",
"temp",
"atemp",
"hum",
"windspeed",
"casual",
"registered",
"cnt",
"id"
],
"Values": [
[
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
Math.floor(Math.random() * 11)
]
]
}
},
"GlobalParameters": {}
}
推荐答案
scope.invoice = {
输入:{
input1:{
ColumnNames:[
instant,
dt eday,
season,
yr,
mnth,
hr ,
holiday,
工作日,
workingday,
weathersit,
< span class =code-string> temp,
atemp,
hum,
windspeed,
casual,
registered,
cnt,
id
],
值:[
[
< span class =code-string>,
,
,
,
,
,
,
,
,
,
,
跨度> ,
,
,
,
,
,
数学 .floor(数学 .random()* 11 )
]
]
}
},
GlobalParameters:{}
}
scope.invoice = { "Inputs": { "input1": { "ColumnNames": [ "instant", "dteday", "season", "yr", "mnth", "hr", "holiday", "weekday", "workingday", "weathersit", "temp", "atemp", "hum", "windspeed", "casual", "registered", "cnt", "id" ], "Values": [ [ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", Math.floor(Math.random() * 11) ] ] } }, "GlobalParameters": {} }
这篇关于对于循环JSON,角度为每次重复该值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文