Update content/resources/how-to-guides/reduce-to-construct-JSON.md

pull/4160/head
kelseiv 2022-07-07 10:41:25 -07:00 committed by GitHub
parent 31e9823c69
commit acff52ebc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ Use the [reduce()](/flux/v0.x/stdlib/universe/reduce/) function to create a JSON
1. Import both the [array](/flux/v0.x/stdlib/array/) package to query data and contruct table(s), and the [http package](/flux/v0.x/stdlib/http/) to transfer JSON over http.
2. Use `array.from()` to query data and construct a table. Or, use another method [to query data with Flux](/influxdb/v2.3/query-data/flux/).
3. Use the `reduce()` function to start constructing a JSON. The output of reduce is stored in the result `output of reduce`. This table looks like:
3. Use the `reduce()` function to construct a JSON object, and then use `yield()` to store the output of reduce. This table looks like:
| field | tag |
| :-------------------- | :----------------------------- |