MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / nested_array_in_object

Function nested_array_in_object

nodedb-sql/src/parser/object_literal.rs:447–461  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

445
446 #[test]
447 fn nested_array_in_object() {
448 let m = parse("{ data: { items: [1, 2, 3] } }");
449 let inner = match &m["data"] {
450 Value::Object(o) => o,
451 _ => panic!("expected Object"),
452 };
453 assert_eq!(
454 inner["items"],
455 Value::Array(vec![
456 Value::Integer(1),
457 Value::Integer(2),
458 Value::Integer(3),
459 ])
460 );
461 }
462
463 #[test]
464 fn dotted_key() {

Callers

nothing calls this directly

Calls 1

parseFunction · 0.70

Tested by

no test coverage detected