Skip to content

Commit

Permalink
Merge pull request #127 from MauricioRobayo/development
Browse files Browse the repository at this point in the history
fix: query method documentation
  • Loading branch information
MauricioRobayo authored Jul 14, 2021
2 parents 550f1e2 + 17eff7a commit eb768f4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,15 @@ This method allows you to use any custom [`SoQL query`](https://dev.socrata.com/
For example:

```js
const data = await trmApi.query(
"SELECT valor, vigenciadesde WHERE valor >= 4150 AND vigenciadesde < '2020-08-01'"
);
trmApi
.query(
"SELECT valor, vigenciadesde WHERE valor >= 4150 AND vigenciadesde < '2020-08-01'"
)
.then((data) => console.log(data))
.catch((error) => console.log(error));
```

It will always return an array of objects with the requested fields (or all the fields if no SELECT clause used):
It will return an array of objects each with the requested fields (or all the fields if no SELECT clause used):

```js
[
Expand Down

0 comments on commit eb768f4

Please sign in to comment.