Skip to content

Commit 904a33f

Browse files
author
Suhel Chakraborty
authored
Fixed example (#14) (#15)
1 parent 39f52cd commit 904a33f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ int main() {
184184
typed(json_element) element = result_unwrap(json_element)(&element_result);
185185

186186
// Fetch the "hello" key value
187-
result(json_element) hello_element_result = json_object_find(&element, "hello");
187+
result(json_element) hello_element_result = json_object_find(&element.value.as_object, "hello");
188188
if(result_is_err(json_element)(&hello_element_result)) {
189189
typed(json_error) error = result_unwrap_err(json_element)(&hello_element_result);
190190
fprintf(stderr, "Error getting element \"hello\": %s\n", json_error_to_string(error));

0 commit comments

Comments
 (0)