Multiple queries same cell
Hi,
Is there any way to import multiple queries? That is, to add several IMPORTJSONAPI functions in the same cell and with different filters?
I need to return the following URLs:
https://api.xxxxx.com.br/v1/xxxx/Catalogo/18?&j= " https://api.xxxxx.com.br/v1/xxxx/Catalogo/20?&j= " https://api.xxxxx.com.br/v1/xxxx/Catalogo/25?&j= "
As you can see the code after the "/" is changed for each query, so I need to aggregate all of these queries in a single cell.
No way to do this at the moment I'm afraid.
For those who need it I managed to do it using the QUERY formula from Google Sheets.
Problem solved, thanks.
Here is an example:
=QUERY({IMPORTJSONAPI("https://api.xxxx.com.br/v1/CrossDocking/Catalogo/2?limit=4000&j="; "$.produtos[?(@.preco_normal>20)]";((CAMPOS_IMPORTJSONAPI));"headers={'token':'da363bf44XXXXXXXXXXdebdbe4788d2'}");IMPORTJSONAPI("https://api.xxxx.com.br/v1/CrossDocking/Catalogo/3?limit=4000&j=";"$.produtos[?(@.preco_normal>20)]";((CAMPOS_IMPORTJSONAPI));"headers={'token':'da363bf4445cXXXXXXXXXbdbe4788d2'}");IMPORTJSONAPI("https://api.xxxx.com.br/v1/CrossDocking/Catalogo/4?limit=4000&j=";"$.produtos[?(@.preco_normal>20)]";((CAMPOS_IMPORTJSONAPI));"headers={'token':'da363bf4445cdXXXXXXXXXXXXdbe4788d2'}");IMPORTJSONAPI("https://api.xxxx.com.br/v1/CrossDocking/Catalogo/14?limit=4000&j=";"$.produtos[?(@.preco_normal>20)]";((CAMPOS_IMPORTJSONAPI));"headers={'token':'da363bf4445cd95d4XXXXXXXXXXXXe4788d2'}");IMPORTJSONAPI("https://api.xxxx.com.br/v1/CrossDocking/Catalogo/18?limit=4000&j=";"$.produtos[?(@.preco_normal>20)]";((CAMPOS_IMPORTJSONAPI));"headers={'token':'da363bf4445cdXXXXXXXXXXXXXXXXX788d2'}");IMPORTJSONAPI("https://api.xxxx.com.br/v1/CrossDocking/Catalogo/23?limit=4000&j=";"$.produtos[?(@.preco_normal>20)]";((CAMPOS_IMPORTJSONAPI));"headers={'token':'da363bf4445cdXXXXXXXXXXXXXXbe4788d2'}");IMPORTJSONAPI("https://api.xxxx.com.br/v1/CrossDocking/Catalogo/19?limit=4000&j=";"$.produtos[?(@.preco_normal>20)]";((CAMPOS_IMPORTJSONAPI));"headers={'token':'da363bf4445cXXXXXXXXXXXdbe4788d2'}")};"SELECT * ")
Well done and thanks for sharing the solution!
I will reopen this issue just so that it is easier for other people to find this info.