Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

it is not possible to address an implicit array via ucl_find_path (dot notation) #51

Closed
allanjude opened this issue Nov 22, 2014 · 1 comment

Comments

@allanjude
Copy link
Contributor

If your configuration has an implicit array (two objects with the same key), it is not possible to address the second (or third...) object with ucl_find_path

server {
disk {
device = /dev/ad0;
}
disk {
device = /dev/ad1;
}
}

ucl_find_path(obj, 'server.disk');

returns the first disk. You have to know that it is an implicit array (obj->type = UCL_OBJECt, obj->next != 0) and ucl_object_iterate(obj, &it, false) over the object to get to the latter items.

Any ideas?

@allanjude
Copy link
Contributor Author

This was my own lack of understanding how ucl works. This is fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant