Skip to content

Multiply & Divide functions in JsonPath #910

Open
@sanketyd

Description

@sanketyd

Need multiplying & dividing support in JsonPath.

Why is it required?
We have a service that uses JsonPath extensively to generate huge Json configurations based on user inputs. Sometimes the values in configuration need to be derived from multiple user inputs & that's where multiply & divide functions are required.

Usage will be like this:-
div($.numerator, $.denominator)
$.numbers.mul()
mul($.left, $.right)

Also, I am curious as to why is there no functionality for multiplying & dividing but other arithmetic is there in JsonPath.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions