mirror of
https://github.com/AykutSarac/jsoncrack.com.git
synced 2025-01-27 15:22:56 +08:00
remove unnecessary parse
This commit is contained in:
parent
19ef620eff
commit
91549de4e1
@ -68,7 +68,7 @@ const relationships = (xs: { id: string; children: never[] }[]) => {
|
||||
|
||||
export const parser = (input: string | string[]) => {
|
||||
try {
|
||||
if (typeof input !== "object") input = JSON.parse(input);
|
||||
// if (typeof input !== "object") input = JSON.parse(input);
|
||||
if (!Array.isArray(input)) input = [input];
|
||||
|
||||
const mappedElements = extract(input);
|
||||
|
Loading…
x
Reference in New Issue
Block a user