You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this example, we use the `Where()` helper. This can make building complex [QuickBase queries](https://help.quickbase.com/api-guide/componentsquery.html) easier.
54
+
55
+
The `Where()` helper documentation can be found [here](!https://github.com/robswc/quickbase-json-api-client/wiki/Helper:-Where).
56
+
57
+
36
58
## Response Objects
37
59
38
60
A `QBResponse` object is returned when querying records with QJAC. A `QBResponse` has several methods that make
39
61
handling returned data easier. Here are a few of the most useful ones.
40
62
41
63
### Response Methods
42
64
43
-
-**data()**
65
+
-**.data()**
66
+
67
+
```python
68
+
r = qbc.query_records(...).data()
69
+
```
44
70
45
-
Returns the actual data. Equivalent to calling `.get('data')`
71
+
Returns the data from QuickBase. Equivalent to calling `.get('data')`
46
72
47
-
-**denest()**
73
+
-**.denest()**
74
+
75
+
```python
76
+
r = qbc.query_records(...).denest()
77
+
```
48
78
49
79
Denests the data. I.e. changes `{'fid': {'value': 'actualValue'}}` to `{'fid': 'actualValue'}`
50
80
51
-
-**orient(orient='records', key='3')**
81
+
-**orient(orient: str, key: int)**
82
+
83
+
```python
84
+
r = qbc.query_records(...).orient('records', key=3)
85
+
```
52
86
53
87
Orients the data. Currently, the only option is 'records'. This will orient the returned data into a "record like structure", i.e. changes
54
88
`{'fid': 'actualValue', 'fid': 'actualValue'}` to `{'key': {etc: etc}}`
55
89
56
90
-**convert()**
57
91
92
+
93
+
```python
94
+
r = qbc.query_records(...).convert('datetime')
95
+
```
96
+
58
97
Converts the data, based on fields and provided arguments. For example, calling `convert('datetime')` will convert all data with fields
59
98
of the 'date time' type to python datetime objects. Other conversions are 'currency' and 'int'.
60
99
61
100
-**round_ints()**
62
101
102
+
103
+
```python
104
+
r = qbc.query_records(...).round_ints()
105
+
```
106
+
107
+
63
108
Rounds all float integers into whole number ints. i.e. converts `55.0` to `55`.
0 commit comments