Neo4jClient

How to pass a list of maps in UNWIND query using neo4jClient?
Regards,

Bhavin Panchal

You could either use Java types:

List<Integer> valueList = List.of(1, 2, 3, 4);
Map<String, Object> values = new HashMap<>();
values.put("list", valueList);

client.query("UNWIND $list as value return value")
		.bindAll(values)
		.fetch().all()
		.forEach(System.out::println);

or use Driver's value types

Map<String, Object> values = new HashMap<>();
values.put("list", Values.value(Values.values(1, 2, 3, 4)));

client.query("UNWIND $list as value return value")
		.bindAll(values)
		.fetch().all()
		.forEach(System.out::println);

Thanks for giving the response, But In my case, I have a list of maps. Ex. List<Map<String,Object>> value.