ffjson
filter and format json in the string
install
$ npm i ffjson -g$ npm i ffjson --save
Usage
const ffjson = ;let str = '{"a":1,"b":2,"o":true,"s":"this is a string","c":[1,2,3],"d":{"e":3,"f":3}}aaa[1,2,3,5]'let items = ffjson;// item : {isJson:true, content:....}
cat xxx.file | ffjsontail -f xxx.log | ffjsonecho '{"a":1,"b":2,"o":true,"s":"this is a string","c":[1,2,3],"d":{"e":3,"f":3}}aaa[1,2,3,5]' | ffjson
have fun ~