How do I use a views data with a paragraph? I have a content type with dynamic content block section. Each block section is managed by paragraph bundle.

Let's explain using an example to make more clear-


Content type name is Employee.
A paragraph field is added in the employee content type. Field machine name is field_body_contents 
All paragraph bundle is showing in dropdown and admin can select the paragraph bundle to add content with the employee.
We have created the template for each paragraph bundle and these are rendering perfectly on the template file.


Now there is a new case that we need to embed the views data with the field_body_contents dropdown so that admin can section views from the dropdown to inject views data between paragraph bundle.
The way I've done this is to preprocess the paragraph and alter the $variables['content'] to contain the views data/render array you've retrieved programatically:

function HOOK_preprocess_paragraph(&amp;$variables) {
  if ($variables['paragraph']-&gt;type-&gt;target_id == 'yourparagraph') {
     //code to get the view you want
     ...
     ...
     $variables['content']['view_content'] = $theviewdata;

  }
}