I have googlesheets functions that parse json and import to sheets, you can find the code for the function in ImportJson file. The functions is pretty simple and self explanatory.
/**
* Imports JSON data to your spreadsheet Ex: IMPORTJSON("[login to view URL]","city/population")
* @param url URL of your JSON data as string
* @param xpath simplified xpath as string
* @customfunction
*/
I had some additional requirements that this function cannot do. Need to search API output in JSON format for value and print entire array content.
For example I had a JSON output as attached file "[login to view URL]" . You can also check live version of this API on this link " [login to view URL]"
To get DCF value on "2019-03-30", I can simply use functions as this:
=IMPORTJSON("[login to view URL]","historicalDCF/0/DCF") as this date is the first in the array.
I need to search through date and get the value of Stock Price? For example I need to get the value of Stock price and DCF on this date "2017-09-30" . How could I do it without knowing array position ?
So for this I need help either by creating new function or modifying existing function to get this functionality.