Recursively extracts all string values from a nested object structure. Useful for handling error payloads that can be deeply nested.
flattenToStrings({ a: "hello", b: { c: "world" } }) // ["hello", "world"]flattenToStrings(["a", ["b", "c"]]) // ["a", "b", "c"]flattenToStrings("hello") // ["hello"] Copy
flattenToStrings({ a: "hello", b: { c: "world" } }) // ["hello", "world"]flattenToStrings(["a", ["b", "c"]]) // ["a", "b", "c"]flattenToStrings("hello") // ["hello"]
Recursively extracts all string values from a nested object structure. Useful for handling error payloads that can be deeply nested.