JavaScript
x
19
19
1
var addObjectResponse = [{
2
'DateTimeTaken': '/Date(1301494335000-0400)/',
3
'Weight': 100909.090909091,
4
'Height': 182.88,
5
'SPO2': '222.00000',
6
'BloodPressureSystolic': 120,
7
'BloodPressureDiastolic': 80,
8
'BloodPressurePosition': 'Standing',
9
'VitalSite': 'Popliteal',
10
'Laterality': 'Right',
11
'CuffSize': 'XL',
12
'HeartRate': 111,
13
'HeartRateRegularity': 'Regular',
14
'Resprate': 111,
15
'Temperature': 36.6666666666667,
16
'TemperatureMethod': 'Oral',
17
'HeadCircumference': '',
18
}];
19
This is a sample object which i am getting from back end, now i want to change the order of the object. I don’t want to sort by name or size… i just want to manually change the order…
Advertisement
Answer
if you want to manually reorder. simply create new object and assign values using old object.
JavaScript
1
7
1
var newObject= [{
2
'DateTimeTaken': addObjectResponse.DateTimeTaken,
3
'Weight': addObjectResponse.Weight,
4
'Height': addObjectResponse.Height,
5
'SPO2': addObjectResponse.SPO2
6
}];
7