I have two arrays. Length of array A is fixed and length of array B depends on DB result. Both Array A and B are key(timestamp) value(count) pair arrays. In array B some timestamp are missing, I need to populate missing timestamp value as zero. If timestamp is present I need to use the value. How do I achieve this?
Ex: Array A = {[time:1481280113, value: 0], [time:1481280053, value: 0],..}
Array B = {[time:1481280113, value: 1234], [time:1481279983, value: 123],..}
Result A = {[time:1481280113, value: 0], [time:1481280053, value: 0],[time:1481279983, value: 123]..}