> For the complete documentation index, see [llms.txt](https://check-engineering.gitbook.io/ts-utils/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://check-engineering.gitbook.io/ts-utils/functions/object-methods/parsenumvalues.md).

# parseNumValues

### `parseNumValues(obj)`

Recursively parses the values of an input object, converting any numeric string values to numbers. It ensures that numeric strings within the object are correctly converted to numerical values for consistent data processing.

### Arguments

* `obj` (`object`): The input object to be parsed, containing values that may be numeric strings.

### Returns

* `object`: A new object with numeric string values converted to numbers.

### Example

```typescript
typescript
import { parseNumValues } from 'check-engineering/ts-utils';

const data = {
  value1: '42',
  nested: {
    value2: '3.14',
    value3: '1000'
};

const parsedData = parseNumValues(data); // => { value1: 42, nested: { value2: 3.14, value3: 1000 } }
```

### Usage

```typescript
typescript
import { parseNumValues } from 'check-engineengineering/ts-utils';

const inputObject = {
  number1: '123',
  number2: '456',
  nested: {
    number3: '789'
  }
};

const parsedObject = parseNumValues(inputObject); // => { number1: 123, number2: 456, nested: { number3: 789 } }
```

### Notes

* The `parseNumValues` function is designed to handle objects with numeric values represented as strings, converting them to actual numbers for consistent data processing.
* It recursively traverses the object's properties, identifying numeric string values and converting them to numerical data types.
* This function is useful for ensuring data consistency and accuracy when dealing with objects containing numeric values in string format.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://check-engineering.gitbook.io/ts-utils/functions/object-methods/parsenumvalues.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
