looks like your function is doing what you want. However just not logging properly, that might be because you need to Stringify your json object, so try it out on the console.log to do value.Stringify(...) and see if it fixes it! You can check what the function does here:1