Skip to content

Commit d1581d7

Browse files
authored
Merge pull request #297 from nocodb/docs/json-extract
docs: JSON extract
2 parents 2a014f6 + 2f12f9e commit d1581d7

File tree

11 files changed

+56
-52
lines changed

11 files changed

+56
-52
lines changed

content/docs/automation/webhook/index.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ Webhooks in NocoDB are **configured per table** and can be tailored with custom
1111

1212
This article discusses **Webhook v3**, which is the latest version of webhooks in NocoDB. It includes a new user interface and additional features compared to the previous version. For more information on the differences between webhook v2 and v3, please refer to the [Webhook v2 vs v3](/docs/product-docs/automation/webhook/webhook-v2-vs-v3) article.
1313

14-
<Callout type="note">
15-
[Webhook v2](/docs/product-docs/automation/webhook/webhook-v2-deprecated) will be deprecated in the future. While it will continue to function for a limited period, all new features and enhancements are exclusive to webhook v3. Users are strongly encouraged to migrate to webhook v3 for continued support and access to the latest functionality.
16-
</Callout>
14+
<Callout type="note">[Webhook v2](/docs/product-docs/automation/webhook-v2-deprecated) will be deprecated in the future. While it will continue to function for a limited period, all new features and enhancements are exclusive to webhook v3. Users are strongly encouraged to migrate to webhook v3 for continued support and access to the latest functionality.</Callout>
1715

1816

1917
#### Related Topics

content/docs/fields/field-types/formula/conditional-expressions.mdx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: 'Conditional Expressions'
2+
title: 'Conditional expressions'
33
description: 'This article explains various conditional expressions that can be used in formula fields.'
44
tags: ['Fields', 'Field types', 'Formula']
55
keywords: ['Fields', 'Field types', 'Formula', 'Create formula field', 'Conditional expressions']
@@ -79,7 +79,7 @@ Output
7979
TRUE if at least one of the conditions `{field} > 2` or `{field} < 10` evaluates to TRUE
8080
```
8181

82-
:::tip
82+
8383
Logical operators, along with Numerical operators can be used to build conditional `expressions`.
8484

8585
Examples:
@@ -97,10 +97,5 @@ SWITCH({quarterNumber},
9797
'INVALID'
9898
)
9999
```
100-
:::
101100

102-
## Related Articles
103-
- [Numeric and Logical Operators](/docs/product-docs/fields/field-types/formula/operators)
104-
- [Numeric Functions](/docs/product-docs/fields/field-types/formula/numeric-functions)
105-
- [String Functions](/docs/product-docs/fields/field-types/formula/string-functions)
106-
- [Date Functions](/docs/product-docs/fields/field-types/formula/date-functions)
101+
---

content/docs/fields/field-types/formula/date-functions.mdx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,3 @@ This function returns the hour of the day as an integer between 0 and 23 (inclus
188188

189189
---
190190

191-
## Related Articles
192-
- [Numeric and Logical Operators](/docs/product-docs/fields/field-types/formula/operators)
193-
- [Numeric Functions](/docs/product-docs/fields/field-types/formula/numeric-functions)
194-
- [String Functions](/docs/product-docs/fields/field-types/formula/string-functions)
195-
- [Conditional Expressions](/docs/product-docs/fields/field-types/formula/conditional-expressions)

content/docs/fields/field-types/formula/formula-result-formatting.mdx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,4 @@ When NocoDB recognizes a formula's output as a Boolean result, you can apply the
6565

6666
---
6767

68-
## Related Articles
69-
- [Numeric Functions](/docs/product-docs/fields/field-types/formula/numeric-functions)
70-
- [String Functions](/docs/product-docs/fields/field-types/formula/string-functions)
71-
- [Date Functions](/docs/product-docs/fields/field-types/formula/date-functions)
72-
- [Conditional Expressions](/docs/product-docs/fields/field-types/formula/conditional-expressions)
7368

content/docs/fields/field-types/formula/formula.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,11 @@ keywords: ['Fields', 'Field types', 'Formula', 'Create formula field']
3434
- [String Functions](/docs/product-docs/fields/field-types/formula/string-functions)
3535
- [Date Functions](/docs/product-docs/fields/field-types/formula/date-functions)
3636
- [Array Functions](/docs/product-docs/fields/field-types/formula/array-functions)
37+
- [Generic Functions](/docs/product-docs/fields/field-types/formula/generic-functions)
38+
- [JSON Functions](/docs/product-docs/fields/field-types/formula/json-functions)
3739
- [Conditional Expressions](/docs/product-docs/fields/field-types/formula/conditional-expressions)
3840

41+
---
3942

4043

4144

content/docs/fields/field-types/formula/generic-functions.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: 'Generic Functions'
2+
title: 'Generic functions'
33
description: 'This article explains system functions & miscellaneous functions that can be used in formula fields.'
44
tags: ['Fields', 'Field types', 'Formula']
55
keywords: ['Fields', 'Field types', 'Formula', 'Create formula field', 'System functions', 'Miscellaneous functions']
@@ -22,3 +22,4 @@ RECORD_ID() => 1
2222
```
2323

2424
---
25+
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
title: 'JSON functions'
3+
description: 'This article explains various JSON functions that can be used in formula fields.'
4+
tags: ['Fields', 'Field types', 'Formula', 'JSON']
5+
keywords: ['Fields', 'Field types', 'Formula', 'JSON', 'Create formula field', 'JSON functions']
6+
---
7+
8+
This sheet provides a quick reference guide for various JSON functions commonly used in data analysis and programming. Each function is accompanied by its syntax, a sample usage, and a brief description.
9+
10+
## JSON_EXTRACT
11+
12+
The `JSON_EXTRACT` function extracts a value from a JSON string using a jq-like syntax.
13+
14+
#### Syntax
15+
16+
```plaintext
17+
JSON_EXTRACT(json_string, path)
18+
```
19+
20+
#### Sample
21+
22+
```plaintext
23+
JSON_EXTRACT('{"a": {"b": "c"}}', '.a.b') => "c"
24+
JSON_EXTRACT({json_column}, '.key')
25+
```
26+
27+
#### Remark
28+
29+
* `json_string` must be a valid JSON string.
30+
* `path` follows jq-like dot notation (e.g., `.a.b` to access nested values).
31+
* Returns the extracted value as a string.
32+
33+
---

content/docs/fields/field-types/formula/meta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"array-functions",
1010
"conditional-expressions",
1111
"generic-functions",
12+
"json-functions",
1213
"formula-result-formatting"
1314
]
1415
}

content/docs/fields/field-types/formula/numeric-functions.mdx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -358,12 +358,6 @@ VALUE("123$") => 123
358358
VALUE("USD -45.67") => -45.67
359359
```
360360

361-
------------
362-
363-
## Related Articles
364-
- [Numeric and Logical Operators](/docs/product-docs/fields/field-types/formula/operators)
365-
- [String Functions](/docs/product-docs/fields/field-types/formula/string-functions)
366-
- [Date Functions](/docs/product-docs/fields/field-types/formula/date-functions)
367-
- [Conditional Expressions](/docs/product-docs/fields/field-types/formula/conditional-expressions)
361+
---
368362

369363

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: 'Numeric and Logical Operators'
2+
title: 'Numeric and Logical operators'
33
description: 'This article explains various numeric and logical operators that can be used in formula fields.'
44
tags: ['Fields', 'Field types', 'Formula']
55
keywords: ['Fields', 'Field types', 'Formula', 'Create formula field', 'Numeric operators', 'Logical operators', 'String operators']
@@ -8,23 +8,21 @@ keywords: ['Fields', 'Field types', 'Formula', 'Create formula field', 'Numeric
88

99
### Numeric operators
1010

11-
| Operator | Sample | Description |
12-
|----------|-----------------------------|----------------------------------|
11+
| Operator | Sample | Description |
12+
|----------|---------------------------|----------------------------------|
1313
| `+` | `{field1} + {field2} + 2` | Addition of numeric values |
1414
| `-` | `{field1} - {field2}` | Subtraction of numeric values |
1515
| `*` | `{field1} * {field2}` | Multiplication of numeric values |
1616
| `/` | `{field1} / {field2}` | Division of numeric values |
1717

18-
:::tip
19-
To change the order of arithmetic operation, you can use round bracket parenthesis ().
20-
Example: `({field1} + ({field2} * {field3}) / (3 - {field4} ))`
21-
:::
18+
<Callout type="info">To change the order of arithmetic operation, you can use round bracket parenthesis ().
19+
Example: `({field1} + ({field2} * {field3}) / (3 - {field4} ))` </Callout>
2220

2321

2422
### Logical operators
2523

26-
| Operator | Sample | Description |
27-
|----------|--------------------------|--------------------------|
24+
| Operator | Sample | Description |
25+
|----------|------------------------|--------------------------|
2826
| `<` | `{field1} < {field2}` | Less than |
2927
| `>` | `{field1} > {field2}` | Greater than |
3028
| `<=` | `{field1} <= {field2}` | Less than or equal to |
@@ -34,14 +32,9 @@ Example: `({field1} + ({field2} * {field3}) / (3 - {field4} ))`
3432

3533
### String operators
3634

37-
| Operator | Sample | Description |
38-
|----------|--------------------------|--------------------------|
39-
| `&` | `{field1} & {field2}` | String concatenation |
35+
| Operator | Sample | Description |
36+
|----------|-----------------------|----------------------|
37+
| `&` | `{field1} & {field2}` | String concatenation |
4038

4139

42-
## Related Articles
43-
- [Numeric Functions](/docs/product-docs/fields/field-types/formula/numeric-functions)
44-
- [String Functions](/docs/product-docs/fields/field-types/formula/string-functions)
45-
- [Date Functions](/docs/product-docs/fields/field-types/formula/date-functions)
46-
- [Conditional Expressions](/docs/product-docs/fields/field-types/formula/conditional-expressions)
47-
40+
---

0 commit comments

Comments
 (0)