Adds initial JPath functionality

This commit is contained in:
Matt C 2017-07-25 16:27:59 +01:00
parent d46e279933
commit de80db73f2
4 changed files with 57 additions and 0 deletions

View file

@ -215,6 +215,7 @@ const Categories = [
"Extract dates",
"Regular expression",
"XPath expression",
"JPath expression",
"CSS selector",
"Extract EXIF",
]
@ -278,6 +279,7 @@ const Categories = [
"CSS Beautify",
"CSS Minify",
"XPath expression",
"JPath expression",
"CSS selector",
"Strip HTML tags",
"Diff",

View file

@ -2243,6 +2243,24 @@ const OperationConfig = {
}
]
},
"JPath expression": {
description: "Extract information from a JSON object with an JPath query",
run: Code.runJpath,
inputType: "string",
outputType: "string",
args: [
{
name: "JPath",
type: "string",
value: Code.JPATH_INITIAL
},
{
name: "Result delimiter",
type: "binaryShortString",
value: Code.JPATH_DELIMITER
}
]
},
"CSS selector": {
description: "Extract information from an HTML document with a CSS selector",
run: Code.runCSSQuery,