mirror of
https://github.com/actiontech/dble.git
synced 2026-01-05 20:30:40 -06:00
inner-1937: arr[0] return self (#3446)
Signed-off-by: dcy10000 <dcy10000@gmail.com> Signed-off-by: dcy10000 <dcy10000@gmail.com>
This commit is contained in:
@@ -28,7 +28,7 @@ import java.util.*;
|
||||
* Create Date: 2022-01-24
|
||||
*/
|
||||
public class ItemFuncJsonExtract extends ItemStrFunc {
|
||||
public static final String ER_INVALID_JSON_PATH = "illegal pattern";
|
||||
public static final String ER_INVALID_JSON_PATH = "illegal json path leg";
|
||||
public static final char SCOPE = '$';
|
||||
public static final char BEGIN_MEMBER = '.';
|
||||
public static final char BEGIN_ARRAY = '[';
|
||||
@@ -215,6 +215,9 @@ public class ItemFuncJsonExtract extends ItemStrFunc {
|
||||
nextResults.add(jsonArray.get(leg.getArrayCell()));
|
||||
}
|
||||
|
||||
} else if (leg.getArrayCell() == 0) {
|
||||
//inner-1937
|
||||
nextResults.add(result);
|
||||
}
|
||||
|
||||
if (findRecursive) {
|
||||
|
||||
Reference in New Issue
Block a user