I have got this jquery array
var left=[1,2,3,4];
3
7
You need to use map function here. Try this:
var left = [1,2,3,4]; result = left.map(function(item) { return item == 3? 7: item; });