SQL Server - Move data from secondary ndf file to primary mdf file
If the datafile are in different filegroup the approach number 2 won't work, it will only work on the same filegroup. 

For the Approach 1, please check: https://stackoverflow.com/questions/2438019/how-i-can-move-table-to-another-filegroup/31351806

I wouldn't recommend to move data back to primary filegroup, this should be only used for system objects and should be kept small for in case where you need to do piece meal recovery.