Skip to content

Tag: angularjs

Find missing day from array of dates javascript

I am getting an array of day dates from an API: In this example the array is missing this date: What is the best way to find a missing day from an array of dates in Javascript or Angular? So that I later would be able to pass it to a datepicker as a disabled day. Answer Check this out:

cannot access objects inside service response

When I tried to access the JSON response I cannot access the object. I need to get the target and datapoint objects and after that I need to iterate the dataPoint array. result.target is undefined in the above case. Controller: JSON response that I am receiving: Answer Response is an array, so you have to use…