2
0

🐛 (webhook) Correctly parse array of strings in data dropdown

This commit is contained in:
Baptiste Arnaud
2023-04-06 18:11:08 +02:00
parent 75d2a95d08
commit a7dbe93edd

View File

@@ -12,6 +12,14 @@ export const getDeepKeys = (obj: any): string[] => {
} else if (Array.isArray(obj[key])) {
if (obj[key].length === 0) continue
if (typeof obj[key][0] !== 'object') {
keys.push(key)
keys = keys.concat(
obj[key].map((_: string, index: number) => `${key}[${index}]`)
)
continue
}
const subkeys = getDeepKeys(obj[key][0])
if (obj[key].length > 1) {
keys = keys.concat(