[feature request]functions toJSON add a option to return a escaped compacted json data(remove all whitespaces)

I want to get a escaped one-line json string, I will use the escaped json string as a param of my bash script. my workflow.yml example

name: demo25
on:
  workflow_dispatch:
    inputs:
      start:
        description: "start"
        default: '0'
      end:
        description: end
        default: '2'
jobs:
  job1:
    runs-on: self-hosted
    steps:
      - run: |
          ...
          ./myscript.sh ${{ toJSON(github.event.inputs, true)}}

Can you add this function? thanks

toJSON example:

example 1,

echo "${{ toJSON(github.event.inputs, true)}}"

return

"{\"aa\":\"bb\",\"bb\":\"cc\"}"

example 2,

echo "${{ toJSON(github.event.inputs)}}"

return

{
  "aa": "bb",
  "bb": "cc"
}

currently, I have to use jq

name: demo25
on:
  workflow_dispatch:
    inputs:
      start:
        description: "start"
        default: '0'
      end:
        description: end
        default: '2'
jobs:
  job1:
    runs-on: self-hosted
    steps:
      - run: |
          ...
          a=$(echo '${{ toJSON(env)}}' | jq -c .)
          ./myscript.sh ''"$a"''