是否可以显示ArrayList最后一个数组元素数据
我有ArrayList并且只想显示最后一个数组数据
this.truckDataPoints = [];
这是我的ArrayList对象
这是我的数据:
{
"jobs" : [ {
"job_id" : 10,
"users" : [ {
"user_id" : 11,
"data_points" : [ {
"efficiency" : "good",
"rev" : 1,
"probe" : "carboratour",
"device_id" : "26e09c88237d5342",
"measurements" : "2",
"form_id" : "2",
"instrument" : "plug",
"background" : "7",
"surveyed_item_id" : "100",
"duration" : 0,
"start_time" : "2017-07-20T04:04:43.000Z",
"datastream" : "GENERIC",
"username" : "abc@gmail.com.com"
}, {
"efficiency" : "good",
"rev" : 1,
"probe_type" : "carboratour",
"device_id" : "26e09c88237d5342",
"fixed_measurements" : "2",
"form_id" : "2",
"instrument_type" : "plug",
"background_value" : "7",
"surveyed_item_id" : "100",
"duration" : 0,
"start_time" : "2017-07-20T04:04:43.000Z",
"datastream" : "GENERIC",
"username" : "rs022015@gmail.com.com"
}, {
"condition" : "good",
"rev" : 2,
"type" : "carboratour",
"device_id" : "26e09c88237d5342",
"measurements" : "2",
"form_id" : "2",
"speed" : "plug",
"brand" : "7",
"company" : "100",
"duration" : 0,
"start_time" : "2017-07-20T04:04:43.000Z",
"datastream" : "GENERIC",
"username" : "rs022015@gmail.com.com"
} ]
} ]
} ]
}
我想只显示最后一个元素