resolve_json_data_node_hash(struct lyd_node *siblings, struct parsed_pred pp)
{
    struct lyd_node *ret = NULL;
    char *key_or_value = NULL;

    if (pp.schema->nodetype == LYS_LEAFLIST) {
        assert((pp.len == 1) && (pp.pred[0].name[0] == '.') && (pp.pred[0].nam_len == 1));

        key_or_value = strndup(pp.pred[0].value, pp.pred[0].val_len);
    } else if (pp.schema->nodetype == LYS_LIST) {
        key_or_value = strndup(pp.pred_str, pp.pred_str_len);
    }

    /* try to find the node */
    lyd_find_sibling_val(siblings, pp.schema, key_or_value, &ret);
    free(key_or_value);

    return ret;
}
resolve_json_data_node_hash(struct lyd_node *siblings, struct parsed_pred pp)
{
    struct lyd_node *ret = NULL;
    char *key_or_value = NULL;

    if (pp.schema->nodetype == LYS_LEAFLIST) {
        assert((pp.len == 1) && (pp.pred[0].name[0] == '.') && (pp.pred[0].nam_len == 1));

        key_or_value = strndup(pp.pred[0].value, pp.pred[0].val_len);
    } else if (pp.schema->nodetype == LYS_LIST) {
        key_or_value = strndup(pp.pred_str, pp.pred_str_len);
    }

     
    lyd_find_sibling_val(siblings, pp.schema, key_or_value, &ret);
    free(key_or_value);

    return ret;
}