You could a reviver function of JSON.parse and convert numerical values to numbers.

Using the reviver parameter

If a reviver is specified, the value computed by parsing is transformed before being returned. Specifically, the computed value and all its properties (beginning with the most nested properties and proceeding to the original value itself) are individually run through the reviver. Then it is called, with the object containing the property being processed as this, and with the property name as a string, and the property value as arguments. If the reviver function returns undefined (or returns no value, for example, if execution falls off the end of the function), the property is deleted from the object. Otherwise, the property is redefined to be the return value.

If the reviver only transforms some values and not others, be certain to return all untransformed values as-is, otherwise they will be deleted from the resulting object.

var json = '[{"key":"Idle Time","values":[{"x":"SADSA","y":"4.0"},{"x":"FDDG","y":"6.0"},{"x":"FF","y":"4.15"}]},{"key":"Operational Time","values":[{"x":"SADSA","y":"20.0"},{"x":"FDDG","y":"18.0"},{"x":"FF","y":"19.45"}]}]',
    data = JSON.parse(json, (key, value) => !isNaN(value) ? +value : value);
    
console.log(data);
.as-console-wrapper { max-height: 100% !important; top: 0; }
Run code snippetEdit code snippet Hide Results Copy to answer Expand

Answer from Nina Scholz on Stack Overflow
🌐
JSON Formatter
jsonformatter.org β€Ί string-to-json-converter
String to JSON Converter online to convert JSON string to JSON
String to JSON Converter online converts JSON String to JSON data by removing escapped data.
🌐
Json Parser Online
json.parser.online.fr
Json Parser Online
Analyze your JSON string as you type with an online Javascript parser, featuring tree view and syntax highlighting. Processing is done locally: no data send to server.
🌐
Code Beautify
codebeautify.org β€Ί string-to-json-online
String to JSON Online to convert JSON Text to JSON Tree.
String to JSON Online is easy to use tool to Convert String to JSON Tree which helps to analyze JSON data in tree mode.
People also ask

Does the String to JSON converter validate JSON?
Yes, the tool validates the JSON structure and may return errors for invalid input.
🌐
databeautifier.com
databeautifier.com β€Ί string-to-json-convertor
String to JSON Converter – Free Online Tool
What does the String to JSON converter do?
The String to JSON converter transforms plain text strings into structured JSON format.
🌐
databeautifier.com
databeautifier.com β€Ί string-to-json-convertor
String to JSON Converter – Free Online Tool
Is the String to JSON converter beginner-friendly?
Yes, the tool is easy to use and suitable for beginners as well as experienced developers.
🌐
databeautifier.com
databeautifier.com β€Ί string-to-json-convertor
String to JSON Converter – Free Online Tool
🌐
Jsontostring
jsontostring.com
Convert JSON to String Online
JSON - JavaScript Object Notation. JSON - for storing and exchanging data. Make use of our Json to String Online Converter tool which brings the desired solution in minutes. If you have a huge set of content to be converted into a string, our tool can make your work easier!
🌐
Jam
jam.dev β€Ί utilities β€Ί query-params-to-json
Query Params to JSON Converter | Free, Open Source & Ad-free
You can convert URL query parameters into JSON format with this free online tool. Made with πŸ’œ by the developers building Jam. If you work with web applications, APIs, or data manipulation, you can use this Query Params to JSON converter to transform query strings into structured JSON objects.
🌐
DataBeautifier
databeautifier.com β€Ί string-to-json-convertor
String to JSON Converter – Free Online Tool
The Best Online String to JSON Convertor simplifies the workflow for developers by automatically detecting patterns in the input string and converting them into structured JSON format, making it ideal for parsing log files, CSV content, configuration files, or dynamically generated text.
Find elsewhere
🌐
String.is
string.is β€Ί query-string-to-json-converter
Online Query String to JSON Converter - string.is
A query string is the portion of a URL where key/value data is passed to the destination page. Enter a URL below below to convert its query parameters to JSON format, or load an example.
Top answer
1 of 3
2

You could a reviver function of JSON.parse and convert numerical values to numbers.

Using the reviver parameter

If a reviver is specified, the value computed by parsing is transformed before being returned. Specifically, the computed value and all its properties (beginning with the most nested properties and proceeding to the original value itself) are individually run through the reviver. Then it is called, with the object containing the property being processed as this, and with the property name as a string, and the property value as arguments. If the reviver function returns undefined (or returns no value, for example, if execution falls off the end of the function), the property is deleted from the object. Otherwise, the property is redefined to be the return value.

If the reviver only transforms some values and not others, be certain to return all untransformed values as-is, otherwise they will be deleted from the resulting object.

var json = '[{"key":"Idle Time","values":[{"x":"SADSA","y":"4.0"},{"x":"FDDG","y":"6.0"},{"x":"FF","y":"4.15"}]},{"key":"Operational Time","values":[{"x":"SADSA","y":"20.0"},{"x":"FDDG","y":"18.0"},{"x":"FF","y":"19.45"}]}]',
    data = JSON.parse(json, (key, value) => !isNaN(value) ? +value : value);
    
console.log(data);
.as-console-wrapper { max-height: 100% !important; top: 0; }
Run code snippetEdit code snippet Hide Results Copy to answer Expand

2 of 3
1

The following code can also work for you:

var strJson = '[{"key":"Idle Time","values":[{"x":"SADSA","y":"4.0"},{"x":"FDDG","y":"6.0"},{"x":"FF","y":"4.15"}]},{"key":"Operational Time","values":[{"x":"SADSA","y":"20.0"},{"x":"FDDG","y":"18.0"},{"x":"FF","y":"19.45"}]}]';
var parsedJSON = JSON.parse(strJson); 
var res = [];
parsedJSON.forEach((obj) => {
  obj.values.forEach((innerObj) => {
    innerObj.y = parseFloat(innerObj.y);
  });
  res.push(obj);
});
console.log(res);
Run code snippetEdit code snippet Hide Results Copy to answer Expand

🌐
JSON Formatter
jsonformatter.org β€Ί json-stringify-online
JSON Stringify Online using JSON.Stringify()
Ad blocking? It's okay. Please share to support us: ... JSON Stringify Online helps convert string value to JSON String using JSON.Stringify().
🌐
Data.Page
data.page β€Ί json β€Ί csv
JSON to CSV Converter
We are eager to produce amazing data solutions for you. If you have any ideas at all, let's discuss them. A taste of what we can do for you: transform JSON / XML / scraped HTML into a report / HTML dashboard / chart / Google Spreadsheet (using powerful underlying SQL queries and easily modified templates)
🌐
curl
curl.se β€Ί docs β€Ί manpage.html
curl - How To Use
When expanding variables, curl supports a set of functions that can make the variable contents more convenient to use. It can trim leading and trailing white space with "trim", output the contents as a JSON quoted string with "json", URL encode the string with "url", base64 encode it with "b64" and base64 decode it with "64dec".
🌐
QuickType
quicktype.io
quicktype
In JSON these are all strings. quicktype recognizes the UUID, the ISO 8601 timestamp and the URL, and gives each the right type: Guid, DateTimeOffset and Uri.
🌐
JSONLint
jsonlint.com
JSONLint - The JSON Validator
JSONLint is the free online validator, json formatter, and json beautifier tool for JSON, a lightweight data-interchange format.
🌐
Code Beautify
codebeautify.org β€Ί json-to-string-online
JSON to String Converter to convert JSON data to JSON String.
Step 2: Select if you want to create Javascript variable. Step 3: Copy the generated output JSON string data and use it in the program.
🌐
Clickbait
clickbait.wiki β€Ί projects β€Ί string_to_json.html
Text to JSON String Converter
Convert any text to a properly formatted JSON string. Free online tool for developers and data engineers.
🌐
GitHub
github.com β€Ί nlohmann β€Ί json
GitHub - nlohmann/json: JSON for Modern C++ Β· GitHub
Non-member functions: operator<<, operator>>, to_string ... Here are some examples to give you an idea how to use the class. ... β†’ Check the documentation β†’ Browse the standalone example files β†’ Read the full API Documentation with self-contained examples for every function Β· The json class provides an API for manipulating a JSON value.
🌐
Wikipedia
en.wikipedia.org β€Ί wiki β€Ί JSON
JSON - Wikipedia
2 weeks ago - Although Crockford originally asserted ... valid JSON documents that are not valid JavaScript; JSON allows the Unicode line terminators U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR to appear unescaped in quoted strings, while ECMAScript 2018 and older do not....
🌐
Text-Utils
text-utils.com β€Ί json formatter
JSON Formatter & JSON To One Line - Online Formatters | Text-Utils.com
September 6, 2025 - This is a client-side utility. Your data will NOT leave your own browser. Copy shareable link is limited to 5,000 characters as it uses a client-side feature. ... JSON Formatter online: The JSON Formatter can be used to convert JSON to one line or format it using a specified level of indentation.