From 7b1a40e1a8e48aa542b732fa209b2bbcb0adceaa Mon Sep 17 00:00:00 2001 From: TommyB123 Date: Tue, 15 Nov 2022 20:02:46 -0600 Subject: [PATCH] Fix issue with JSON_ArrayIterate skipping first index --- src/plugin.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugin.rs b/src/plugin.rs index 4e68ccb..2f48bc6 100644 --- a/src/plugin.rs +++ b/src/plugin.rs @@ -672,6 +672,7 @@ impl Plugin { Some(v) => v.clone(), None => return Ok(1), }; + *index += 1; // adding to the index here because -1 should be passed for the first iteration let v = match v.as_array() { Some(v) => v, None => return Ok(1), @@ -686,7 +687,6 @@ impl Plugin { let v = self.json_nodes.alloc(v); *output = v; - *index += 1; Ok(0) }