@xuda.io/xuda-worker-bundle-min 1.3.1087 → 1.3.1088
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +12 -5
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2212,12 +2212,19 @@ func.datasource.execute = async function (
|
|
|
2212
2212
|
let output_result = exp.result
|
|
2213
2213
|
if (tree_obj.apiOutput === "json") {
|
|
2214
2214
|
// iterate object to fix expressions
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2215
|
+
try {
|
|
2216
|
+
let output_result_obj = JSON5.parse(output_result)
|
|
2217
|
+
for await (let [key, val] of Object.entries(output_result_obj)) {
|
|
2218
|
+
output_result_obj[key] = (await func.expression.get(
|
|
2219
|
+
SESSION_ID,
|
|
2220
|
+
val,
|
|
2221
|
+
dataSourceSession, "object_property")).result
|
|
2222
|
+
}
|
|
2223
|
+
output_result = JSON.stringify(output_result_obj)
|
|
2224
|
+
} catch (err) {
|
|
2225
|
+
console.error(err)
|
|
2220
2226
|
}
|
|
2227
|
+
|
|
2221
2228
|
}
|
|
2222
2229
|
_ds.api_rendered_output +=
|
|
2223
2230
|
output_result + (tree_obj.apiOutput === "json" ? "," : "");
|