data tree FEATURE macro for opaque node value
diff --git a/src/tree_data.h b/src/tree_data.h
index b7ab513..e5ad560 100644
--- a/src/tree_data.h
+++ b/src/tree_data.h
@@ -766,6 +766,14 @@
 };
 
 /**
+ * @brief Macro for getting the value from an opaque node.
+ *
+ * @param[in] node Opaque node with the value.
+ * @return Node value.
+ */
+#define LYD_OPAQ_VALUE(node) ((struct lyd_node_opaq *)(node))->value
+
+/**
  * @brief Get the generic parent pointer of a data node.
  *
  * @param[in] node Node whose parent pointer to get.