Get data from a field using query in Computed field and use it as an array I have a content type wherein the user will add holidays.

It has Holiday Date field(field_holiday_date).

How can I get the dates in that column using query and use it as an array in Computed field?



Thanks for you help!
You can pass any value of node or something else in jquery like

$node_id = 5;
$node = node_load($node_id);
$settings = array(
    'title' =&gt; $node-&gt;title,
    'custom-data' =&gt; 'ABC',
);
drupal_add_js(array('mymodule' =&gt; $settings), 'setting');
drupal_add_js(drupal_get_path('module', 'mymodule') . '/js/mymodule.js', 'file');


And get that value in jquery like (you have to put this code in mymodule.js)

(function($) {
        Drupal.behaviors.mymodule = {
            attach: function(context, settings) {            
                var title = Drupal.settings.mymodule.title;
                console.log(title); // or perform some operation as you prefer
                var custom_data = Drupal.settings.mymodule.custom-data;
                console.log(custom_data );
            }
        };
    }(jQuery));