Skip to content

Commit 7e4aa6c

Browse files
committed
Extract message content in mini-playground output to match rpk CLI
The mini-playground was showing the full WASM result structure {"msg": {...}, "meta": {...}} while the main playground and rpk CLI extract just the message content. Now both playgrounds display consistent output.
1 parent b982d89 commit 7e4aa6c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/js/16-bloblang-interactive.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,9 @@
909909
let formattedResult = result;
910910
try {
911911
const parsed = JSON.parse(result);
912-
formattedResult = JSON.stringify(parsed, null, 2);
912+
// Extract .msg field like main playground does
913+
const message = parsed.msg !== undefined ? parsed.msg : parsed;
914+
formattedResult = JSON.stringify(message, null, 2);
913915
} catch {
914916
// Not JSON, use as-is
915917
}

0 commit comments

Comments
 (0)